0

I installed Android Studio and created a project. That's all I did, create a project and gave it a name.

But I get the following error messages:

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>

Looking through similar problems posted here, I tried uninstalling and reinstalling and running Studio as administrator, but I get the same result. I've also turned off my firewall.

Stuck at the first hurdle!

Suggestions appreciated

Zoe
  • 27,060
  • 21
  • 118
  • 148
pir8ped
  • 199
  • 1
  • 1
  • 8
  • you should look for cause of your problem on forum, here it's [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 Oct 07 '17 at 10:57
  • I've seen hat thread and tried a few suggestions. None of them worked for me - using "url 'http://repo1.maven.org/maven2'" for maven, using a url for jcenter - "url "http://jcenter.bintray.com/""..I can see the junit jar in the lib folder. – pir8ped Oct 07 '17 at 11:57

1 Answers1

0

Problem solved. I uninstalled AS, uninstalled Java and removed references to java in the registry. Installed AS, and all's well. So if you had the same problem as me, and have Java previously installed, this might be the source of your problem.

pir8ped
  • 199
  • 1
  • 1
  • 8