Reputation: 1333
today I woked up to the morning when I can not run my Ionic project like I was able a few hours ago.
$ ionic cordova run android --device -lsdc
gives:
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] A problem occurred configuring root project 'android'.
[cordova] > Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
[cordova] Searched in the following locations:
[cordova] https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] BUILD FAILED
I have tried to delete Android platform, didn't help.
$ cordova -v
8.1.2 ([email protected])
please, suggest what should I do to run the project again.
Upvotes: 2
Views: 930
Reputation: 51
I temporary fixed it moving jcenter() in the build.gradle file to the bottom of the parameters (see Android gradle Failed to resolve: play-services-basement) e.g. i changed this:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
to this:
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
before it was in the first line - therefore it cannot find the basement file.
Upvotes: 2
Reputation: 34
What version is your Android Cordova platform? I just got this same error on Cordova 8.1.2, but after updating my Android platform from 7.0.0 to 7.1.1 (the latest as of this writing) I was able to build successfully.
cordova platform list
cordova platform remove android
cordova platform update android
cordova platform add android
Upvotes: 0