Reputation: 7724
I have created an blank project and successfully build and run in my device
but when i add this plugin
ionic cordova plugin add cordova-plugin-geofence
and giveionic cordova run android
i am getting the error as
i have not written any code
Upvotes: 2
Views: 8570
Reputation: 746
getting same problem in ionic 5 build and solved by running the following commands
cordova clean android
cordova plugin add cordova-android-support-gradle-release
Upvotes: 0
Reputation: 1159
go to ionic_folder/platforms/android/build.gradle
If you see this lines of code in your file
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
Change the order of the executions
buildscript {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
Then go again and run your application by doing ionic cordova run android
Upvotes: 0
Reputation: 1159
Just to clarify, I changed my package.json to:
"cordova-android": "6.2.0",
which fixed the problem for me.
Upvotes: 0
Reputation: 11935
You gotta open your Andoroid SDK Manager and install the following components as mentioned in the error:
Upvotes: 0