解决warning: Ignoring InnerClasses attribute for an anonymous inner class

在proguard-rules.pro文件中添加

-keepattributes EnclosingMethod

然后在build.gradle编译配置中引用,例:

buildTypes {
    debug {
        debuggable true
        jniDebuggable true
        zipAlignEnabled true
        minifyEnabled false
        shrinkResources false
        signingConfig signingConfigs.debug
    }
    release {
        debuggable false
        jniDebuggable false
        zipAlignEnabled true
        minifyEnabled true
        shrinkResources true
        signingConfig signingConfigs.release
        proguardFiles getDefaultProguardFile('proguard-       android.txt'), 'proguard-rules.pro'
    }
}

你可能感兴趣的:(Android)