i recently upgraded android studio but im not able to find the source of the following issue reported in android studio 3.1:
Warning: The rule `-keep public clas
class android.support.annotation.Keep is what I use (Android Studio 3.1.2) ...
-keep @interface android.support.annotation.Keep
-keep @android.support.annotation.Keep class *
-keepclasseswithmembers class * {
@android.support.annotation.Keep ;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep ;
}
there are further flags to control which annotations to keep:
-keepattributes RuntimeVisibleAnnotations
-keepattributes AnnotationDefault
-keepattributes *Annotation*
one can get the raw output by running ./gradlew assembleRelease in the terminal tab.
when nothing in the project's ProGuard configuration refers to Annotation, this warning might originate from the "consumer" rules of some referenced library, to be obfuscated at build time.
hence it appears to be a harmless warning, one can possibly mute it:
-dontwarn java.lang.annotation.Annotation