开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜