android studio 3.1 Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {

后端 未结 11 1597
天命终不由人
天命终不由人 2021-01-31 07:48

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         


        
11条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 08:35

    I got same issue because of "multiDexEnabled true" setting in gradle defaultConfig.

    I resolved this issue by adding multidex dependency "implementation 'com.android.support:multidex:1.0.3'"

    android {
    defaultConfig {
        ...
        multiDexEnabled true
    }
    ...
    }
    
    dependencies {
      implementation 'com.android.support:multidex:1.0.3'
    }
    

    Reference : https://developer.android.com/studio/build/multidex

提交回复
热议问题