Getting “EnclosingMethod” errors on building in Android Studio 2

后端 未结 4 1029
不知归路
不知归路 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:20

    Update 2016/09/19

    This is fixed in LeakCanary 1.4, so simply upgrading should fix it without needing to mess with an alternate version of haha.

    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4'
    

    Previously

    These warnings are caused by haha:2.0.2, which is a dependency of leakcanary-android:1.4-beta2.

    It's fixed in haha:2.0.3, so you can fix it by explicitly using the newer version in your dependencies. Add this line for each flavor where you are adding a leakcanary dependency. You don't need to add it for leakcanary-android-no-op, since it has no dependencies.

    debugCompile 'com.squareup.haha:haha:2.0.3'
    

提交回复
热议问题