達(dá)令說(shuō)
2021-11-17 15:20:38
我的項(xiàng)目已正確構(gòu)建并運(yùn)行,但自從我更新了 Android Studio 后,它會(huì)出現(xiàn)這些錯(cuò)誤……并且未選中離線(xiàn)工作。錯(cuò)誤Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:multidex:1.0.3. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:design:26.1.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:cardview-v7:26.1.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:recyclerview-v7:26.1.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:appcompat-v7:26.1.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support.constraint:constraint-layout:2.0.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:support-compat:26.1.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.github.ybq:Android-SpinKit:1.1.0. Open File Show DetailsUnable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:appcompat-v7:26.1.0. Open File Show DetailsFailed to resolve: com.android.support.test:runner:1.0.2 Show in File Show in Project Structure dialogFailed to resolve: com.android.support.test.espresso:espresso-core:3.0.2 Show in File Show in Project Structure dialogFailed to resolve: com.android.support:multidex-instrumentation:1.0.2 Open File Show in Project Structure dialog
2 回答

慕桂英4014372
TA貢獻(xiàn)1871條經(jīng)驗(yàn) 獲得超13個(gè)贊
我找到了......就像Yuenbe所說(shuō)的那樣添加jcenter()和google()......然后啟動(dòng)一個(gè)vpn然后構(gòu)建項(xiàng)目

飲歌長(zhǎng)嘯
TA貢獻(xiàn)1951條經(jīng)驗(yàn) 獲得超3個(gè)贊
在您的項(xiàng)目.gradle(不是應(yīng)用模塊一)中,您可能缺少 Google 存儲(chǔ)庫(kù)。這就是無(wú)法找到依賴(lài)項(xiàng)的原因。
buildscript {
repositories {
google() // <-- This is the line you must add
jcenter()
}
}
添加回答
舉報(bào)
0/150
提交
取消