AndroidStudio配置常見問題及解決

【1】,"Unable to access Android SDK add-on list..."

解決:直接點擊cancel,取消後進入系統在SDK Manager中重新定位sdk文件夾的位置。


【2】,第一次打開AS後出現”Could not download junit.jar (junit:junit:4.12)“

Error:A problem occurred configuring project ':app'.
> Could not download junit.jar (junit:junit:4.12)
   > Could not get resource 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar'.
      > Could not GET 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar'.
         > peer not authenticated

解決:重新下載junit4.12,並將其放在...\Android Studio\gradle\gradle-2.8\lib\plugins中,並重啓Android Studio即可


【3】,設置離線工作環境後出現 Error:A problem occurred configuring project ':app'.
> Could not download junit.jar (junit:junit:4.12): No cached version available for offline mode

解決:在Gradle文件夾下,找到build.gradle(module app), 將裏邊的dependences { }中的測試依賴項(有關junit.jar的 (

testCompile 'junit:junit:4.12'
)刪除,其他的保留)。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章