アプリ@デバッグ/ compileClasspath」の依存関係を解決することができません。

問題の説明

アンドロイドStudioの新規プロジェクトを使用した後、エラー:

Unable to resolve dependency for :app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.;

ソリューション

build.gradleプロジェクトの依存関係、すなわち、修正を行うために、コードに依存関係。

# 原始代码
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

# 修改后代码
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.4'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
公開された21元の記事 ウォン称賛11 ビュー20000 +

おすすめ

転載: blog.csdn.net/y609532842/article/details/104682002