Why does my android app report that it cannot "find" my own class? possibly related to proguard? -


im developing android app, , started using proguard due "# of classes" library contained.

in process, have been able add proguard rules , recompile app , "run" it.

only each time "run" it, errors out , reports

caused by: java.lang.classnotfoundexception: didn't find class "com.mycompany.mymodule.utils" on path: dexpathlist... 

since proguard has been implemented in order reduce total number of classes, use proguard on every build. dollars donuts problem lies in file - because app ran smoothly before added. have added following lines proguard.pro file in android studio try force resolved:

-keepclassmembers class com.mycompany.mymodule -keep public class * extends android.app.activity -keep public class * extends android.app.application  -keepclasseswithmembers class com.mycompany.mymodule.** { *; } -keepclasseswithmembers class com.mycompany.mymodule.utils {*;} 

however, not solve problem.

i @ loss because application errors out on startup. have ideas on can fix this?

if classnotfoundexception, should keep class this:

-keep class com.mycompany.mymodule.utils 

the option -keepclassmembers keeps specified class members (fields , methods).

the option -keepclasseswithmembers keeps classes have specified class members (and members).

see proguard manual > usage > overview of keep options.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -