Android Gradle Plugin v3.6.0/3.6.1 构建Bug
程序员文章站
2022-04-19 14:11:11
升级AndroidStudio AGP(Android Gradle Plugin)到 3.6.0/3.6.1版本后打包会出现如下异常:Execution failed for task ':app:minifyReleaseWithR8'.java.lang.NullPointerException (no error message)解决方式:1、升级R8 AGP(Android G......
升级AndroidStudio AGP(Android Gradle Plugin)到 3.6.0/3.6.1版本后打包会出现如下异常:
Execution failed for task ':app:minifyReleaseWithR8'.java.lang.NullPointerException (no error message)
解决方式:
1、升级R8 AGP(Android Gradle Plugin)版本
buildscript {
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw'
}
}
dependencies {
classpath 'com.android.tools:r8:1.6.82' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
目前该Bug已经提交官方后续版本会修复。
2、降级到 AGP v3.5.x
本文地址:https://blog.csdn.net/MillerKevin/article/details/105226987