gradle AndroidApp不再开发

polhcujo  于 2023-10-19  发布在  Android
关注(0)|答案(1)|浏览(91)

当我想运行我的应用程序时,我得到Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction

  • 我更新了所有依赖项
  • 我增加了JVM的RAM
  • 我试过MultiDex
  • 我清理了建筑
  • 我让我的缓存失效了

我的建筑的一部分.gradle

dependencies {

    implementation ('androidx.core:core:1.12.0')  {
        exclude group: "com.android.support", module: "support-v4"
    }
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.preference:preference:1.2.1'

    //Support
    implementation "androidx.drawerlayout:drawerlayout:1.2.0"
    implementation "androidx.gridlayout:gridlayout:1.0.0"
    implementation "androidx.recyclerview:recyclerview:1.3.1"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation "androidx.navigation:navigation-fragment:2.7.4"
    implementation "androidx.appcompat:appcompat-resources:1.6.1"

    //Graphview
    implementation 'com.jjoe64:graphview:4.2.1'
    implementation 'org.apache.commons:commons-lang3:3.4'

}
mbjcgjjk

mbjcgjjk1#

我想出了如何摆脱这个错误。很简单,只需在gradle.properties中添加两行即可。

android.useAndroidX=true
android.enableJetifier=true

相关问题