构建应用程序时出现意外错误"无法找到外部课程"更新到gradle3.1.0-beta1后(Android Studio 3.1 Beta1)

时间:2018-01-31 21:34:27

标签: android android-studio android-gradle

运行:./ gradlew clean assembleDebug

Exception in thread "main" java.lang.NullPointerException: Couldn't find outer class xxxxx/SomeClass$someMethod$1$1$2 of xxxx/SomeClass$someMethod$1$1$2$1

execution failed for task ':app:transformClassesWithDesugarForDevDebug'.

issue

同样的问题https://www.reddit.com/r/androiddev/comments/7u8tug/android_studio_31_beta_1_is_available/

2 个答案:

答案 0 :(得分:3)

解决方法解决了: https://issuetracker.google.com/issues/72750890#comment10

JB也填写了一个错误。

答案 1 :(得分:0)

尝试在gradle.properties文件中添加android.enableD8.desugaring = true

然后清理并重建项目