开发者

proguard build nosuchmethoderror

开发者 https://www.devze.com 2023-03-20 13:32 出处:网络
I\'m building with proguard. I\'ve explicitly told proguard to keep all classes that implement a c开发者_开发知识库ertain interface.

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

精彩评论

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