Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve: com.android.support:support-v4:23.0.0

After update with the latest Android support library 23.1 i get this error

Failed to resolve: com.android.support:support-v4:23.0.0

I tried all combination of 23.+ and 23.1.0 and 23.1.+ etc. How to make it run properly?

apply plugin: 'com.android.application'  android {     compileSdkVersion 23     buildToolsVersion "23.0.1"      defaultConfig {         applicationId "ua.g.tfinder"         minSdkVersion 14         targetSdkVersion 23         versionCode 1         versionName "1.0"     }     buildTypes {         release {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  dependencies {     compile fileTree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:23.0.+'     compile 'com.android.support:support-v4:23.+'     compile 'com.android.support:recyclerview-v7:23.0.+'     compile 'com.android.support:cardview-v7:23.0.+'     compile 'com.android.support:design:23.0.+'     compile 'com.google.android.gms:play-services:7.5.+'     compile 'com.squareup.retrofit:retrofit:1.9.0'     compile 'com.squareup.picasso:picasso:2.5.2' } 
like image 616
SERG Avatar asked Oct 17 '15 09:10

SERG


2 Answers

The support libraries are now available through Google's Maven repository.

Step 1: Open the build.gradle file of your project.

Step 2: Make sure that the repositories section includes a maven section with the "https://maven.google.com" url in it.

allprojects {     repositories {         jcenter()         maven { url 'https://maven.google.com' }     } } 
like image 74
vovahost Avatar answered Oct 13 '22 16:10

vovahost


I ran into the same problem today. Although the SDK Manager marked a few libraries as installed, investigating the location of the files showed me the correct folder structure, without any files in them.

For example, checking out the location of 23.1.0 appcompat-v7 on my Mac: .../sdk/extras/android/m2repository/com/android/support/appcompat-v7 turned out to be an empty folder.

I suspect the update I ran minutes before went wrong somehow.

What solved it for me:

  1. in Android Studio, open Appearance and Behaviour -> System Settings -> SDK Manager
  2. under tab "SDK Tools" un-check the libraries causing problems
  3. click "apply" to uninstall them
  4. re-check the same libraries
  5. click "apply" to reinstall them
  6. close SDK Manager and run Gradle sync / build
like image 33
Emil Korngold Avatar answered Oct 13 '22 16:10

Emil Korngold