当我打开任何新项目时,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/