androidproguardraw

Raw mp3 files do not appear with proguard


When I proguard in this way, all R files can be displayed.

-keepclassmembers class com.android.android.R$* {public static <fields>;}
-keep class com.android.android.R$*

I just want the raw files to be preserved and displayed. Is there something like this for this?

-keepclassmembers class com.android.android.R$.raw* {public static <fields>;}
-keep class com.android.android.R$.raw*

Solution

  • If you want to keep your Raw resources all you need is to add:

    -keep class com.example.myapp.R$raw { *; }
    

    assuming your resources are in the com.example.myapp package :)