2

I am using RoboGuice in my android project.

I added the proguard rules as specified in the documentation: https://github.com/roboguice/roboguice/wiki/ProGuard

However, after I run the release apk, I get java.lang.NullPointerException crashes on views that were supposed to be injected vie RoboGuice.

I found somewhere that adding the following proguard rule for my views fixes that problem:

-keep class com.aaa.bbb.ui.fragments.* { *; }

However, I find it hard to believe that using RoboGuice means that I can't obfuscate my UI classes.

Is there another way to handle this problem?

dors
  • 5,802
  • 8
  • 45
  • 71
  • hi dors, I'm in a similar situation, but I'm able to generate apk & run successfully by using the ProGuard rules from roboguice documentation. – vijay May 11 '15 at 19:57
  • Now I'm struggling to obfuscated my code. So when I { #-dontobfuscate } I get bunch of error and apk is not generated. – vijay May 11 '15 at 20:04
  • Please can someone help me resolve this issue. thanks. – vijay May 11 '15 at 20:08
  • Possible duplicate of http://stackoverflow.com/q/29278951/2291 – Jon Adams Jan 04 '16 at 22:19

0 Answers0