Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Could not find com.android.support:support-v4:23.2.1

Tags:

android

gradle

I add this library in my gradle file:

compile 'com.appeaser.sublimepickerlibrary:sublimepickerlibrary:2.0.0'

I've already these dependencies:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:design:23.+"
compile 'com.android.support:support-v4:23.+'
compile 'com.android.support:support-v13:23.+'
compile 'com.android.support:appcompat-v7:23.+'
compile 'com.android.support:cardview-v7:23.+'
compile 'com.android.support:recyclerview-v7:23.+'

Since, I've added SublimePicker library, I add this error:

Error:Could not find com.android.support:support-v4:23.2.1. Required by: Android:app:unspecified

Could you help me guys ?

like image 471
anthony Avatar asked Mar 25 '16 14:03

anthony


2 Answers

You have to update the SDK Manager.

enter image description here

In any case you should avoid the use of the + in your dependendencies.
Using the + you will not able to replicate the build since you don't know which dependencies you are using.

Use:

compile "com.android.support:design:23.2.1"
compile 'com.android.support:support-v4:23.2.1'
compile 'com.android.support:support-v13:23.2.1'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
like image 67
Gabriele Mariotti Avatar answered Oct 22 '22 10:10

Gabriele Mariotti


After clicking “yes” to another obscure suggestion from IntelliJ IDEA the following change was made:

>git diff gradle/wrapper/gradle-wrapper.properties
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b2d6236..1966ba0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Jan 11 11:12:07 CET 2016
+#Sat Mar 26 12:30:43 CET 2016
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

Now it works. Why? I don't know.

like image 2
Martin Avatar answered Oct 22 '22 09:10

Martin