Android Studio出現Could not find intellij-core.jar錯誤的解決方案
阿新 • • 發佈:2018-11-26
今天看到微信群裡有人從網上下載了一個專案,結果匯入的時候出現了這個錯誤,然後一群人在討論是不是google被牆的原因。我去年也遇到過這個問題,因為是個小問題,所以也就沒有記下來,現在記下來吧,如果你也遇到了這個問題,希望可以幫到你
匯入專案之後,直接提示
Error:Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar
解決方案是:
1、如果你的專案gradle檔案裡沒有依賴maven ,需要新增maven依賴
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
2、有些朋友會說,我已經依賴了maven了,可是還報這個錯怎麼辦?
這時候可以調換一下依賴庫的順序
epositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
再重新編譯一下,問題是不是已經解決啦~~