How to suppress 'Maybe this is program method' warnings from ProGuard

后端 未结 2 507
太阳男子
太阳男子 2021-01-04 04:46

I\'m using ProGuard with my Android application and I\'m running getting the warnings below in my build log. I\'ve added the appropriate \'-keep public class com.foo.OtherCl

相关标签:
2条回答
  • 2021-01-04 05:06

    You can avoid it by explicitly mentioning the method in the configuration:

    -keep class com.foo.OtherClass { com.foo.OtherClass getInstance(); }
    

    Alternatively, you can suppress notes on a class:

    -dontnote com.foo.MyClass
    
    0 讨论(0)
  • 2021-01-04 05:10

    You suppress all messages of type Note by adding the following line:

    -dontnote **
    
    0 讨论(0)
提交回复
热议问题