2016-11-11 247 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. 

感谢

相关问题