Generating and APK file. Error?

#1

Hi All

I am using following to create an APK file.

ionic cordova build --release android

but i am getting the following error

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

  • What went wrong:
    A problem occurred configuring project ‘:CordovaLib’.

No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 17s
[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.

Any advice how to solve the issue

Regards

#2

I’m expecting you are using Android NDK Revision r18 and in this version, GCC is no longer supported.

Download and unzip Android NDK, Revision r17c from this location: NDK Revision History

Then before you start running your ionic build: ionic cordova build --release android set or override your ANDROID_NDK_HOME environment variable to the Android NDK, Revision r17c.

Ex.
$export ANDROID_NDK_HOME=/android-ndk-r17c/
$ionic cordova build --release android

I Hope this will help you to fix your build issue for android

2 Likes
#3

Thanks for your answer, it really worked out.
I only need to copy the missing items from r17c version to the existing one( r18b ).