Cannot Install Support Repository And Sync Project In Android Studio


Answer :

Previously the Android Support Library dependencies were downloaded from Android SDK Manager.

Now all the new versions are available from Google's Maven repository. In future all android libraries will be distributed through maven.google.com

So, by adding the below code to the repositories will build the project.

repositories {     maven {         url "https://maven.google.com"     } } 

I had to add the following to my project level build.gradle. Then the button to install and worked.

allprojects {     repositories {         maven {             url "https://maven.google.com"         }         jcenter()     } } 

Try using the latest support library versions:

compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.google.android.gms:play-services-vision:10.2.1' compile 'com.android.volley:volley:1.0.0' // Third party libraries compile 'com.flurgle:camerakit:0.9.17'  compile 'com.android.support:recyclerview-v7:25.3.1' compile 'com.android.support:cardview-v7:25.3.1' 

here is the detail Dependencies

EDIT

Use Google Maven Repository

To add them to your build, you need to first include Google's Maven repository in your top-level build.gradle file:

Project -- build.gradle (Not app build.gradle)

 allprojects {     repositories {         // If you're using a version of Gradle lower than 4.1, you must instead use:         maven {             url 'https://maven.google.com'         }         // An alternative URL is 'https://dl.google.com/dl/android/maven2/'         jcenter()     } } 

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable