Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve: com.android.support:support-compat: 25.0.1.?

I am not able to find out what is the exact issue when I add the dependencies.

 dependencies {
    compile 'com.github.jetradarmobile:android-snowfall:1.1.2'
}

I get the above error

 my Gradle(Project)


     buildscript {
         repositories {
             jcenter()
         }
         dependencies {
             classpath 'com.android.tools.build:gradle:2.2.1'
         }
     }
     allprojects {
         repositories {
             jcenter() {
                 maven { url "https://jitpack.io" }
             }
         }
     }
     task clean(type: Delete) {
         delete rootProject.buildDir
     }

My Gradle(App)

     apply plugin: 'com.android.application'

     android {
         compileSdkVersion 24
         buildToolsVersion "24.0.3"
         defaultConfig {
             applicationId "com.animationbook.animationbook"
             minSdkVersion 15
             targetSdkVersion 24
             versionCode 1
             versionName "1.0"
             testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         }
         buildTypes {
             release {
                 minifyEnabled false
                 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
             }
         }
     }
     dependencies {
         compile fileTree(include: ['*.jar'], dir: 'libs')
         androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
             exclude group: 'com.android.support', module: 'support-annotations'
         })
         compile 'com.android.support:appcompat-v7:24.2.1'
         debugCompile 'junit:junit:4.12'
         compile 'com.github.moondroid.coverflow:library:1.0'
         compile 'com.github.jetradarmobile:android-snowfall:1.1.2'
     }

How can the error be solved?

like image 600
seon Avatar asked Dec 29 '16 07:12

seon


3 Answers

It's happen because your dependency com.github.jetradarmobile:android-snowfall:1.1.2 has compileSdkVersion 25, buildToolsVersion "25.0.2" & com.android.support:support-compat:25.0.1.

So you need to change com.android.support:appcompat-v7:24.2.1 to com.android.support:appcompat-v7:25.1.0, buildToolsVersion to 25.0.1 and com.android.support:design:25.1.0.

If you don't want to change your buildToolsVersion than you can use module of it and change modules buildToolsVersion.

like image 123
Avani Paneliya Avatar answered Oct 27 '22 10:10

Avani Paneliya


change the buildToolsVersion to 25.0.1 and add dependency compile 'com.android.support:design:25.1.0'

And also change compile 'com.android.support:appcompat-v7:24.2.1' to compile 'com.android.support:appcompat-v7:25.1.0'

like image 39
Nainal Avatar answered Oct 27 '22 12:10

Nainal


I had the same problem and what I did to solve it was Update "Google Repository" and "Android Support repository" in the Android SDK Manager.

I hope it helps!

like image 3
Enrique de Miguel Avatar answered Oct 27 '22 11:10

Enrique de Miguel