Sajjad Hayder
Sajjad Hayder

Reputation: 181

Could not find support-compat.aar (com.android.support:support-compat:26.1.0)

im trying to use spinkit react native library and its working on ios but when i export it on android i get this log

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-spinkit'.
      > Could not find support-compat.aar (com.android.support:support-compat:26.1.0).
        Searched in the following locations:
            https://jcenter.bintray.com/com/android/support/support-compat/26.1.0/support-compat-26.1.0.aar

any ideas?

Upvotes: 1

Views: 2478

Answers (3)

Ishaq Khan
Ishaq Khan

Reputation: 959

Please update the order of building your project through $ cordova build android

Open {project-root-folder}/platforms/android/build.gradle

Existing Code:

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

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

Code Updated as below:

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

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

Upvotes: 0

OneCricketeer
OneCricketeer

Reputation: 192013

Just go to the URL, you can see nothing is found there.

Make sure you have a section like this in your gradle files

repositories {
    google()
    jcenter()
}

Upvotes: 3

Min Liao
Min Liao

Reputation: 29

remove all gradle cache files ( ~/.gradle/ ) ,try again!

Upvotes: 1

Related Questions