0
我安装了Android Studio并创建了一个项目。这就是我所做的一切,创建一个项目并给它命名。安装时出现gradle build错误
,但我得到了以下错误消息:
C:\apps\sound\app\build.gradle
Error:Error:line (28)Failed to resolve: junit:junit:4.12
<a href="openFile:C:/apps/sound/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:Error:Failed to resolve: javax.inject:javax.inject:1
<a href="openFile:C:/apps/sound/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:Error:Failed to resolve: javax.annotation:javax.annotation-api:1.2
<a href="openFile:C:/apps/sound/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:Error:Failed to resolve: com.google.code.findbugs:jsr305:2.0.1
<a href="openFile:C:/apps/sound/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:Error:Failed to resolve: org.hamcrest:hamcrest-library:1.3
<a href="openFile:C:/apps/sound/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:Error:Failed to resolve: org.hamcrest:hamcrest-integration:1.3
<a href="openFile:C:/apps/sound/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:Error:Failed to resolve: com.squareup:javawriter:2.1.1
<a href="openFile:C:/apps/sound/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
通过这里发表类似的问题来看,我试图卸载并重新安装和运行工作室作为管理员,但我得到了相同的结果。我也关闭了防火墙。
卡住了第一个障碍!
意见建议
你应该在论坛上寻找问题的原因,这里是[https://stackoverflow.com/questions/32519219/error23-17-failed-to-resolve-junitjunit4-12](https://stackoverflow。 com/questions/32519219/error23-17-failed-to-resolve-junitjunit4-12) – Ismail
我已经看过帽子线程并尝试了一些建议。没有人为我工作 - 使用“url”http://repo1.maven.org/maven2“”作为maven,使用jcenter的url - “url”http://jcenter.bintray.com/“”..我可以在lib文件夹中看到junit jar。 – pir8ped