Jose  Flores
Jose Flores

Reputation: 132

Problems when building in ionic cordova android

BUILD FAILED in 1s cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

BUILD FAILED in 1s [ERROR] An error occurred while running subprocess cordova.

    cordova build android --release exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information

Upvotes: 2

Views: 1501

Answers (3)

user3257595
user3257595

Reputation: 31

Did two steps

1.Set ANDROID_HOME_NDK

2.Updated as answered by zbyl npm install -g cordova@latest npm install cordova-android@latest --save ionic cordova platform remove android ionic cordova platform check android ionic cordova platform add android

And it worked.

Upvotes: 0

Zbyl
Zbyl

Reputation: 2310

I had the same problem and I tried many things.
I updated everything I could in Android Studio and SDK Manager. Gradle and Android Gradle Plugin got updated in the process - but this didn't help.
Then I updated cordova (from 8.1.2 to 9.0.0) and cordova-android (to 8.0.0) to latest versions - but this in itself didn't help either.
Only removing and re-adding android platform finally solved the issue:

npm install -g cordova@latest
npm install cordova-android@latest --save
ionic cordova platform remove android
ionic cordova platform check android
ionic cordova platform add android

Upvotes: 3

sorenoid
sorenoid

Reputation: 729

Upgrade your version of cordova-android to the latest 7.1.3 and it will use the gradle plugin for android v3.3 which no longer checks for mips abi in the NDK.

also make sure to set the ANDROID_NDK_HOME environment variable to the location of your NDK.

Upvotes: 0

Related Questions