Getting “EnclosingMethod” errors on building in Android Studio 2

后端 未结 4 1031
不知归路
不知归路 2020-12-10 23:46

I am getting below build errors when I am running the app in Android Studio 2. These errors were not there when I was using earlier version of Android Studio.



        
4条回答
  •  心在旅途
    2020-12-11 00:30

    I was getting same error. It seems there was some problem with leakcanary (in my case). I tried following changes in proguard file.

    -dontwarn com.squareup.haha.guava.**
    -dontwarn com.squareup.haha.perflib.**
    -dontwarn com.squareup.haha.trove.**
    -dontwarn com.squareup.leakcanary.**
    -keep class com.squareup.haha.** { *; }
    -keep class com.squareup.leakcanary.** { *; }
    
    # Marshmallow removed Notification.setLatestEventInfo()
    -dontwarn android.app.Notification
    

    I am not getting those issue anymore. Here is the link

提交回复
热议问题