what is the difference between -keep class and -dontwarn

后端 未结 2 1941
再見小時候
再見小時候 2021-02-20 06:42

Hey I\'m new with proGuard , I use it to protect my code from reverse engineering , but when I built my signed apk I got a lot of errors when I enabled proGuard ,I have googled

相关标签:
2条回答
  • 2021-02-20 06:56
    -dontwarn
    

    Specifies not to warn about unresolved references and other important problems at all. The optional filter is a regular expression; ProGuard doesn't print warnings about classes with matching names. Ignoring warnings can be dangerous. For instance, if the unresolved classes or class members are indeed required for processing, the processed code will not function properly. Only use this option if you know what you're doing!

    -keep class
    

    Specifies classes and class members (fields and methods) to be preserved as entry points to your code. For example, in order to keep an application, you can specify the main class along with its main method. In order to process a library, you should specify all publicly accessible elements.

    Hope this Helps!!

    0 讨论(0)
  • 2021-02-20 07:10

    -keep class Preserve the specified classes and class members.

    -dontwarn Don't warn about unresolved references at all.

    More info here http://proguard.sourceforge.net/manual/refcard.html

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