-3

When I create a new Project in Android Studio I get this problems , I don't Know how to resolve them , I'm using Android Studio Version 3.0.1 enter image description here

enter image description here

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.

Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test:runner:1.0.1.

Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test.espresso:espresso-core:3.0.1.

Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.

Error:Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.

Error:Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve junit:junit:4.12.

Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.

Error:Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.

Error:Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve junit:junit:4.12.

and about the code there are No Problem in the code , I don't Know ?

Zoe
  • 27,060
  • 21
  • 118
  • 148
  • Show some code in an [edit]. – LW001 Nov 23 '17 at 20:12
  • I added two pictures you can see them after the description : " When I create a new Project in Android Studio I get this problems , I don't Know how to resolve them , I'm using Android Studio Version 3.0.1 enter image description here enter image description here " – Charioui Bouchaib Nov 23 '17 at 20:21
  • I don't Know They don't show me a problem in the code but They give me this errors , sorry for my bad English :( – Charioui Bouchaib Nov 23 '17 at 20:27
  • Add code as text, please, not as image. Reasons: [Why may I not upload images of code on SO when asking a question?](https://meta.stackoverflow.com/q/285551/1288408) – Modus Tollens Nov 23 '17 at 20:27
  • I wrote the errors ! – Charioui Bouchaib Nov 23 '17 at 20:42
  • Possible duplicate of [Failed to resolve: com.android.support:cardview-v7:26.0.0 android](https://stackoverflow.com/questions/45103230/failed-to-resolve-com-android-supportcardview-v726-0-0-android) – Viktor Yakunin Nov 23 '17 at 21:11
  • Possible duplicate of [Failed to resolve: com.android.support:appcompat-v7:27.+ (Dependency Error)](https://stackoverflow.com/questions/47164768/failed-to-resolve-com-android-supportappcompat-v727-dependency-error) – Abhishek Aryan Nov 24 '17 at 05:16

1 Answers1

0

In your build.gradle (Project level) just replace jcenter() for maven { url "http://jcenter.bintray.com"} in both repositories and allprojects scopes

That will fix it.

Explanation:

By default, jcenter points to a https url, and by some reason, the SSL certificate is not working. If I helped you, please score this answer. Greetings from Brazil!

Bruno Andrade
  • 271
  • 3
  • 6