以前該應用程式運行時沒有任何錯誤。在嘗試通過 Android Studio 編譯和運行應用程式時,它突然開始拋出錯誤。
依賴項:
def retrofit_version = '2.9.0'
def room_version = "2.3.0"
def navigation_component = "2.3.5"
//Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
//Navigation component
implementation "androidx.navigation:navigation-runtime-ktx:$navigation_component"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_component"
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1"
// Firebase
implementation platform('com.google.firebase:firebase-bom:30.2.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
錯誤:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':module_name:mergeDebugResources'.
> Could not resolve all task dependencies for configuration ':module_name:debugRuntimeClasspath'.
> Could not resolve androidx.room:room-common:[2.3.0].
Required by:
project :module_name > androidx.room:room-runtime:2.3.0
project :module_name > androidx.room:room-ktx:2.3.0
> Failed to list versions for androidx.room:room-common.
> Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://jcenter.bintray.com/androidx/room/room-common/'.
> Could not GET 'https://jcenter.bintray.com/androidx/room/room-common/'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 28s
uj5u.com熱心網友回復:
JCenter 實際上已關閉。您可以在此處查看狀態:JCenter 停機時間對解析度的影響
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/523934.html
上一篇:片段大小與TabLayout重疊
下一篇:無法HEAD'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'
