proguard build nosuchmethoderror
I'm building with proguard. I've explicitly told proguard to keep all classes that implement a c开发者_开发知识库ertain interface.
-keep public class * implements com.me.app.views.Fooable
The interface has one method to implement: doSomething. But my app crashes when I build with proguard:
But I still get this error.
java.lang.NoSuchMethodException: doSomething
How can I fix this so proguard wont ruin the build?
You should keep the interface and its method:
-keep interface com.me.app.views.Fooable {
void doSomething();
}
Otherwise, the method may be renamed or even removed.
精彩评论