Large number of errors during Gradle build after upgrading to Android Studio 2.0

前端 未结 7 1439
青春惊慌失措
青春惊慌失措 2020-12-07 20:55

Recently, I upgraded Android Studio from version 1.5 to 2.0 but since then I observe that the number of errors and warnings has increased. Most of the errors do not make sen

7条回答
  •  佛祖请我去吃肉
    2020-12-07 21:05

    Adding -keepattributes EnclosingMethod to proguard rules suppresses these errors and warnings.

    Worked for me like a charm.

    Update : Adding -keepattributes EnclosingMethod to proguard rules actually changes how the classes are obfuscated. This preserves the optional attributes that are typically necessary for your code to be executed WITHOUT such issue.

提交回复
热议问题