首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >AndroidStudio4.0.0 Java 8库在D8和R8构建错误中的消除

AndroidStudio4.0.0 Java 8库在D8和R8构建错误中的消除
EN

Stack Overflow用户
提问于 2020-06-20 05:12:37
回答 6查看 19.9K关注 0票数 23

我开始使用新的更新Android 4.0.0并遵循在D8和R8中启用对java 8库的支持

代码语言:javascript
运行
复制
compileOptions {
        // Flag to enable support for the new language APIs
         coreLibraryDesugaringEnabled true
        // Sets Java compatibility to Java 8
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }

代码语言:javascript
运行
复制
dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.6'
    ...
}

最后,我无法用以下错误构建我的应用程序:

代码语言:javascript
运行
复制
Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.

欲了解更多情况:

代码语言:javascript
运行
复制
> Task :app:compileNoExtensionsDebugSources UP-TO-DATE

> Transform artifact desugar_jdk_libs_configuration-0.12.0.jar (com.android.tools:desugar_jdk_libs_configuration:0.12.0) with L8DexDesugarLibTransform
Error: Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.

> Transform artifact databinding-common-4.0.0.jar (androidx.databinding:databinding-common:4.0.0) with DexingWithClasspathTransform
AGPBI: {"kind":"error","text":"Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.","sources":[{}],"tool":"D8"}

> Transform artifact multidex-2.0.1.aar (androidx.multidex:multidex:2.0.1) with DexingWithClasspathTransform
Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.

AGPBI: {"kind":"error","text":"Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.","sources":[{}],"tool":"D8"}

> Transform artifact kotlin-android-extensions-runtime-1.3.72.jar (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.72) with DexingWithClasspathTransform
AGPBI: {"kind":"error","text":"Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.","sources":[{}],"tool":"D8"}
Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.

我错过了任何配置吗?怎么解决这个问题?

EN

Stack Overflow用户

发布于 2020-07-05 11:03:45

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'稳定可用

票数 5
EN
查看全部 6 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62481928

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档