I am working on a cordova project that has been working fine for a while, and suddenly I started to get a very strange error whenever the build reaches \":app:processArm64De
Add this plugin to the project and it will fix everything
cordova plugin add cordova-android-support-gradle-release --fetch
This has something to do with an update Google did to Android 28 rc that adds two new fields. Thank the gods someone shared a plugin to the world to fix it.
I had the same error. In my case I had to remove in my config.xml the following line:
<preference name="Orientation" value="all" />
This happened to me in July 2020 on a Ionic V1 project, my way to fix it was to upgrade cordova-android from 7.1.4 to the most recent, which was 9.0.0 at the time, and also change the min android sdk version.
ionic cordova platform rm android
// if your project had much trouble building and you prefer a clean build, you may do:
// rm -rf node_modules platforms plugins package-lock.json
// npm install (and maybe npm audit fix later)
ionic cordova platform add android@latest
In config.xml, change or add this (the value 22 may be different in your time):
<preference name="android-minSdkVersion" value="22" />
And finally I was able to build with
ionic cordova build --release android
I tried the solution shown here, and now, I built successfully with Android.
Open file platforms/android/app/build.gradle
add
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
after
dependencies {
...
}
For those who facing this issue after 17/06/2019. After spending number of hours on this issue finally found the solution. This build failure is due to a Major version release of the Google Play Services and Firebase on 17/06/2019
ionic cordova platform rm android
ionic cordova platform add android@8.0.0
ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter
Note: This will resolve your issue
Note: If you are using cordova-plugin-firebase and encountering errors, you can use this plugin which is published as cordova-plugin-firebasex and is fixed to resolve issues caused by the new Firebase SDK:
rm -Rf platforms/android
cordova plugin rm cordova-plugin-firebase
rm -Rf plugins/ node_modules/
npm install
cordova plugin add cordova-plugin-firebasex
cordova platform add android
I hope this will help.
cheers!