I'm trying to build/run an ionic project but from today this error comes up and I could not find any answer. Please, help me.
Error: Could not find any matches for com.android.tools.build:gradle:+ as no versions of com.android.tools.build:gradle are available.
Gradle: Gradle 4.10.2
Kotlin DSL: 1.0-rc-6
On my specific case the problem was with fcm plugin, this was what I did:
In platforms/android/build.gradle check buildscript gradle classpath version, my case was 2.2.3 (com.android.tools.build:gradle:2.2.3)
Then, in platforms/android/cordova-plugin-fcm/XXXX-FCMPlugin.gradle change classpath 'com.android.tools.build:gradle:+' to the same version found above: classpath 'com.android.tools.build:gradle:2.2.3'
That's it, fixed for me.
On my case i had this issue with the phonegap push plugin. I followed @Niroog solution and and was able to solve it. Here is what i did:
I saved and ran cmd "ionic cordova build android -prod" in terminal and it built successful.
Facing the same issue since earlier today. The solutions above didn't work for me.
Came across another thread here...
https://forums.adobe.com/message/10804391#10804391
This one didnt work as well.Maybe I am doing something wrong..
----------EDIT-----------
Here is what worked for me
1) update build.gradle
buildscript {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}.....
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}}
2) update cordova-plugin-fcm/xxxxxx-FCMPlugin.gradle
repositories {
google()
jcenter()
mavenLocal()
}
Inspired from: https://developer.android.com/studio/releases/gradle-plugin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With