Last time I build successfully but after adding the number of pages I am unable to build, I did search for that error a lot but nothing works for me.For example, add
I solve with
Cordova Clean Android
Cordova Build Android
I encountered a similar problem. Installing the plugin helped me
cordova plugin add phonegap-plugin-multidex
I have the same issue
(Unable to merge dex Ionic)
when I created the Ionic app. When I run the app the
BUILD FAILED in 11s 37 actionable tasks: 3 executed
error occurred. First I use the following solution but it doesn't work for me but it work for the other I guess.
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:26.1.0'
}
}
Finally this is what helped me to overcome the issue of failing to build the app.
cordova clean android
ionic cordova build android
ionic cordova run android (To re-launch the app)
Copying this answer from this Github issue comment from Trent Gardner, since anything else didn't work for me:
Fix for the Facebook plugin was to force the Facebook SDK to version 4.25.0.
cordova plugin add cordova-plugin-platform-replace
Then add to your config.xml
<platform name="android"> <replace-string file="project.properties" find="regex:com\.facebook\.android\:facebook-android-sdk\:[\+0-9\.]+" replace="com.facebook.android:facebook-android-sdk:4.25.0" /> </platform>
Finally run
cordova prepare android
Works with the latest 1.9.1 version of cordova-facebook-plugin4
What helped me was running:
cordova clean
I solved this issue by running simply this command and then build the project. don't go into complicated answers like upgrading Gradle or google packages etc..
cordova clean android
ionic cordova build android