提问人:M Baig 提问时间:9/26/2023 更新时间:9/26/2023 访问量:157
如何解决:在 Android Studio 中执行 com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction 时发生故障
how to resolve A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction in android studio
问:
我刚刚启动了一个新的android studio应用程序并尝试运行,但它给出了以下错误
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
这是 build.gradle(:app)
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.littleapp'
compileSdk 33
defaultConfig {
applicationId "com.example.littleapp"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.2.0'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation("androidx.navigation:navigation-compose:2.7.3")
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'androidx.activity:activity-compose:1.7.2'
implementation "androidx.compose.ui:ui:1.5.1"
implementation "androidx.compose.ui:ui-tooling-preview:1.5.1"
implementation 'androidx.compose.material:material:1.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.5.1"
debugImplementation "androidx.compose.ui:ui-tooling:1.5.1"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.5.1"
}
这就是build.gradle
buildscript {
ext {
compose_ui_version = '1.2.0'
}
}
plugins {
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
}
我已经更新了所有依赖项并尝试了,但到目前为止似乎没有任何效果。我不知道为什么它会出现这个错误。我需要如何更改才能删除此错误?Invalidate and Restart
答: 暂无答案
评论