Android Gradle Plugin v3.6.0/3.6.1 构建Bug

升级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://*.com/questions/60896733/execution-failed-for-task-appminifyreleasewithr8-java-lang-nullpointerexcept

Android Gradle Plugin v3.6.0/3.6.1 构建Bug

上一篇:移动平台纹理压缩格式选择


下一篇:ssmcrud的applicationContext.xml配置