1

I am integrating Amazon's ads into my app and I use Proguard. They are telling me if I'm using Proguard that I have to "ensure the R class retains its name during the obfuscation process"

Does anyone know what the means and, if so, how I can accomplish that?

UPDATE

I've tried a bunch of different option and I still get an error from Amazon's SDK that my resources are obfuscated. I've tried:

-keepnames com.my.app.*.R;

-keeppackagenames com.my.app.*.R;

-keepclassmembers com.my.app.*.R;

-keep class com.my.app.*.R;

-keepclassmembers class **.R$* {
    public static <fields>;
}
Kris B
  • 3,436
  • 9
  • 64
  • 106

1 Answers1

0

Proguard obfuscates your code, by replacing all class names and methods with A, B, C, D and so on.

To retain the class names, add -keepnames to your proguard file.

Example could be -keepnames com.example.myproject.R

Also see this SO post: Proguard keep class names?

Also see the proguard project for more information about what it does and what options there are to use: http://proguard.sourceforge.net/#manual/introduction.html

Community
  • 1
  • 1
Darwind
  • 7,284
  • 3
  • 49
  • 48
  • Thanks for the response. I've tried everything and I cannot get Proguard to no obfuscate my resources. I updated the OP to how what I've tried, so far. – Kris B Apr 06 '13 at 01:11