1. 程式人生 > >Android專案編譯報錯Failed to resolve: firebase-iid-interop

Android專案編譯報錯Failed to resolve: firebase-iid-interop

問題說明

很久以前的一個可以編譯執行的Android,今天重新開啟後發現編譯時報錯

Failed to resolve: firebase-iid-interop
Open File


Failed to resolve: play-services-basement
Open File

解決辦法

修改 build.gradle 檔案,將其中 jcenter() 和 google() 兩個倉庫換一下順序,比如

allprojects {
    repositories {
        jcenter()
        google()
        mavenCentral(
) } }

換成

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

參考

https://stackoverflow.com/questions/51195242/failed-to-resolve-firebase-iid-interop