android - 如何修复 “ERROR: Unable to resolve dependency for ':app @ debug/compileClasspath':。” Android错误

标签 android android-studio gradle android-gradle-plugin

当我打开任何新项目时,gradle会显示此错误

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform artifact 'customview.aar (androidx.customview:customview:1.0.0)' to match attributes {artifactType=jar}. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform artifact 'cursoradapter.aar (androidx.cursoradapter:cursoradapter:1.0.0)' to match attributes {artifactType=jar}. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Failed to transform artifact 'customview.aar (androidx.customview:customview:1.0.0)' to match attributes {artifactType=jar}. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Failed to transform artifact 'cursoradapter.aar (androidx.cursoradapter:cursoradapter:1.0.0)' to match attributes {artifactType=jar}. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Failed to transform artifact 'customview.aar (androidx.customview:customview:1.0.0)' to match attributes {artifactType=jar}. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Failed to transform artifact 'cursoradapter.aar (androidx.cursoradapter:cursoradapter:1.0.0)' to match attributes {artifactType=jar}. Show Details Affected Modules: app



this

最佳答案

转到build.gradle(Module:app),并将实现“com.android.support:appcompat-v7:29.+”替换为实现“com.android.support:appcompat-v7:28.0.0”。

关于android - 如何修复 “ERROR: Unable to resolve dependency for ':app @ debug/compileClasspath':。” Android错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57700081/

相关文章:

android - 地理围栏 API : adding successful but not triggered

Android ScrollView 拒绝滚动到底部

android - 在设备模拟器 5554 上启动 Activity com.example.newproj.MainActivity

Android studio Gradle 构建从 eclipse 导入

android - Nativescript命令gradlew.bat失败错误

groovy - 如何在 Gradle 管理的 Groovy 类中实例化 FileTree?

android - 如何从 fresco(facebook 的 android lib)中排除 arm64-v8a 目录

android - 出现软键盘时,工具栏上移

Android Studio 3.1,没有可用于离线模式的缓存版本

android - 我可以将用 Kotlin 编写的库导入到我的 android 项目中吗(使用 java)