2016-11-11 81 views
0

當我嘗試在android studio中運行應用程序時出現以下錯誤。無法接收配置的所有依賴關係::app:_debugUnitTestApkCopy'

錯誤:配置項目':app'時發生問題。

Could not resolve all dependencies for configuration ':app:_debugUnitTestApkCopy'. Could not resolve junit:junit:4.12. Required by: MyFirstAppp:app:unspecified Could not resolve junit:junit:4.12. Could not get resource ' https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom '. Could not GET ' https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom '. Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Connection timed out: connect

回答

0

可能有代理限制或連接問題,不會讓gradle連接和編譯JUnity。

你可以在從的build.gradle刪除依賴性此線(模塊:APP)

testCompile 'junit:junit:4.12' 
0

拉莫斯感謝您的回覆。我有另一個這個錯誤的解決方案。以下是解決錯誤的步驟。

 1. download junit-4.12.jar from https://mvnrepository.com/artifact/junit/junit/4.12 
     2. Then put junit-4.12.jar into your <project>/app/libs/ directory 
     3. Right click on your project and then select "Open Module Settings". Then go to tab "Dependencies" 
     4. From "Dependencies" tab, select and delete junit-4.12.jar 
     5. Then add junit-4.12.jar from your <project>/app/libs directory 
     6. Then rerun your project. 

感謝

相關問題