Hi all,
I can't make @ContentView works when I use Proguard on my app.
For example:
@ContentView(R.layout.activity_foo)
public class Foo extends Activity {
}
Works during development, but as soon as I package my app for release,
the layout in empty. Furthermore, any @InjectView returns null.
I tried setting in "proguard.cfg":
-keepattributes **
Without success. I even see in the proguard log:
+ Runtime visible annotations attribute:
+ Annotation [Lroboguice/inject/ContentView;]:
+ Constant element value [value '73']
+ Integer [2130903067]
So it looks like proguard modifies the @ContentView annotation and the
result does not work. Any suggestions?
Specifically, !code/allocation/variable and !field/* fixed this particular problem. !class/merging/* fixed a problem where dex would error out with an invalid opcode error in the Android support v4 library.
> Hi all, > I can't make @ContentView works when I use Proguard on my app.
> For example: > @ContentView(R.layout.activity_foo) > public class Foo extends Activity { > }
> Works during development, but as soon as I package my app for release, > the layout in empty. Furthermore, any @InjectView returns null.
> I tried setting in "proguard.cfg": > -keepattributes **
> Without success. I even see in the proguard log: > + Runtime visible annotations attribute: > + Annotation [Lroboguice/inject/ContentView;]: > + Constant element value [value '73'] > + Integer [2130903067]
> So it looks like proguard modifies the @ContentView annotation and the > result does not work. Any suggestions?
> -- > You received this message because you are subscribed to the Google Groups > "roboguice" group. > To post to this group, send email to roboguice@googlegroups.com. > To unsubscribe from this group, send email to > roboguice+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/roboguice?hl=en.
> Specifically, !code/allocation/variable and !field/* fixed this particular
> problem. !class/merging/* fixed a problem where dex would error out with
> an invalid opcode error in the Android support v4 library.
> ~Craig
> > Hi all,
> > I can't make @ContentView works when I use Proguard on my app.
> > For example:
> > @ContentView(R.layout.activity_foo)
> > public class Foo extends Activity {
> > }
> > Works during development, but as soon as I package my app for release,
> > the layout in empty. Furthermore, any @InjectView returns null.
> > I tried setting in "proguard.cfg":
> > -keepattributes **
> > Without success. I even see in the proguard log:
> > + Runtime visible annotations attribute:
> > + Annotation [Lroboguice/inject/ContentView;]:
> > + Constant element value [value '73']
> > + Integer [2130903067]
> > So it looks like proguard modifies the @ContentView annotation and the
> > result does not work. Any suggestions?
> > --
> > You received this message because you are subscribed to the Google Groups
> > "roboguice" group.
> > To post to this group, send email to robo...@googlegroups.com<javascript:>
> .
> > To unsubscribe from this group, send email to
> > roboguice+...@googlegroups.com <javascript:>.
> > For more options, visit this group at
> > http://groups.google.com/group/roboguice?hl=en.
>> Specifically, !code/allocation/variable and !field/* fixed this particular
>> problem. !class/merging/* fixed a problem where dex would error out with
>> an invalid opcode error in the Android support v4 library.
>> ~Craig
>> > Hi all,
>> > I can't make @ContentView works when I use Proguard on my app.
>> > For example:
>> > @ContentView(R.layout.activity_foo)
>> > public class Foo extends Activity {
>> > }
>> > Works during development, but as soon as I package my app for release,
>> > the layout in empty. Furthermore, any @InjectView returns null.
>> > I tried setting in "proguard.cfg":
>> > -keepattributes **
>> > Without success. I even see in the proguard log:
>> > + Runtime visible annotations attribute:
>> > + Annotation [Lroboguice/inject/ContentView;]:
>> > + Constant element value [value '73']
>> > + Integer [2130903067]
>> > So it looks like proguard modifies the @ContentView annotation and the
>> > result does not work. Any suggestions?
>> > --
>> > You received this message because you are subscribed to the Google >> Groups
>> > "roboguice" group.
>> > To post to this group, send email to robo...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > roboguice+...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/roboguice?hl=en.
>> Specifically, !code/allocation/variable and !field/* fixed this particular
>> problem. !class/merging/* fixed a problem where dex would error out with
>> an invalid opcode error in the Android support v4 library.
>> ~Craig
>> > Hi all,
>> > I can't make @ContentView works when I use Proguard on my app.
>> > For example:
>> > @ContentView(R.layout.activity_foo)
>> > public class Foo extends Activity {
>> > }
>> > Works during development, but as soon as I package my app for release,
>> > the layout in empty. Furthermore, any @InjectView returns null.
>> > I tried setting in "proguard.cfg":
>> > -keepattributes **
>> > Without success. I even see in the proguard log:
>> > + Runtime visible annotations attribute:
>> > + Annotation [Lroboguice/inject/ContentView;]:
>> > + Constant element value [value '73']
>> > + Integer [2130903067]
>> > So it looks like proguard modifies the @ContentView annotation and the
>> > result does not work. Any suggestions?
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "roboguice" group.
>> > To post to this group, send email to robo...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > roboguice+...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/roboguice?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "roboguice" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/roboguice/-/2pBo6fwQpK4J.
> To post to this group, send email to roboguice@googlegroups.com.
> To unsubscribe from this group, send email to
> roboguice+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/roboguice?hl=en.