Skip to content

NDK 18 toolchains #504

Closed
Closed

Description

@bugsmafia

From Android NDK v18 removed support:
mips64el-linux-android-4.9
mipsel-linux-android-4.9

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

Loading the old archive NDK v17
https://developer.android.com/ndk/downloads/older_releases
and copy in local folder android-sdk > toolchains

Activity

  1. janpio commented on Sep 21, 2018

    @janpio
    Member

    Thanks for creating this issue, seems like instructions how to fix things, right?

    When exactly is this needed? I never got in contact with Android NDK when creating a Cordova app.

  2. bugsmafia commented on Sep 21, 2018

    @bugsmafia
    Author

    Thanks for creating this issue, seems like instructions how to fix things, right?

    When exactly is this needed? I never got in contact with Android NDK when creating a Cordova app.

    Android studio updated my NDK and I had problems with the Cordova-Android

    gradle version for Android studio should now be 3.1 and higher

    cordova-android v 7.0.0 - creates "build.gradle" classpath 'com.android.tools.build:gradle:3.0.1'

  3. bugsmafia commented on Sep 21, 2018

    @bugsmafia
    Author

    https://android.googlesource.com/platform/ndk/+/ndk-release-r18/CHANGELOG.md

    This version of the NDK is incompatible with the Android Gradle plugin version 3.0 or older. If you see an error like No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android, update your project file to use plugin version 3.1 or newer. You will also need to upgrade to Android Studio 3.1 or newer.

  4. ubergeek77 commented on Sep 25, 2018

    @ubergeek77

    Correct me if I'm wrong, but does this mean cordova-android can't currently build for aarch64? I have the toolchain "aarch64-linux-android-4.9" available on my system, however I receive the same error message, stating that "mips64el-linux-android" is not available. However, I don't want to build for a 64-bit MIPS based device. I want to build an app for my phone, which uses an AArch64 processor.

    What do I have to do to get a build going for this architecutre? I've tried adding all of these config options to no avail.

  5. ndarilek commented on Oct 24, 2018

    @ndarilek

    Is there any workaround for this? As of now, Cordova Android fails to build with the latest stable Android Studio, and appears to have for quite some time. I tried upgrading com.android.tools.build:gradle to 3.1, but now that uses Gradle 4.4, and everywhere I try using Gradle 4.4 (I.e. app/build.gradle, gradle-wrapper.properties) something overrides that and bumps it back to 4.1. Immensely frustrating out-of-the-box experience. If there some sort of sdkmanager incantation I should run, I'd expect to find it on https://cordova.apache.org/docs/en/latest/guide/platforms/android/, but I'm just told to install the latest Android Studio. I'm not actually using Android Studio, just the command line, but Android apps definitely build, so aside from not having an older dependency or not being able to upgrade things myself without Cordova undoing them, I don't know what to try next.

    Thanks.

  6. Meithal commented on Oct 24, 2018

    @Meithal

    The workaround is to download the older NDK and replace the currently ndk installed in your android Sdk directory with it.

  7. added a commit that references this issue on Nov 21, 2018
  8. dpogue commented on Nov 21, 2018

    @dpogue
    Member

    This has been fixed in master and will be released in the next major version of Cordova Android.

  9. carlosascari commented on Jan 14, 2019

    @carlosascari

    Google led me here when I was looking for a solution for this problem.

    Heres my solution in case some one else finds it useful

    1. Changing 3.0.1 to 3.1.0 in the build.gradle file So it looks like: classpath 'com.android.tools.build:gradle:3.1.0'

    2. And the following env variable to force gradle 4.4

    export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=https://services.gradle.org/distributions/gradle-4.4-all.zip

    It appears that gradle-wrapper.properties is overwritten with 4.1 by the following code:

    • cordova/lib/builders/GradleBuilder.js:251
    • cordova/lib/builders/StudioBuilder.js:227
  10. ngocdaothanh commented on Feb 25, 2019

    @ngocdaothanh

    This has been fixed in master and will be released in the next major version of Cordova Android.

    @dpogue Has it been released yet? If no, can you release it very soon?

    I'm having the problem mentioned in this issue.

    cordova -v on my Mac gives 8.1.2 (cordova-lib@8.1.1).

  11. ngocdaothanh commented on Feb 25, 2019

    @ngocdaothanh

    export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=https://services.gradle.org/distributions/gradle-4.4-all.zip

    @carlosascari Thanks a lot! You saved many hours for me.

    As of Feb 25, 2019, I use Android Studio 3.3.1 with latest packages to fix the Cordova generated project. Then to be able to run cordova build android from command line, I need to use a newer version:

    export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=https://services.gradle.org/distributions/gradle-4.10.1-all.zip
    
  12. dpogue commented on Feb 25, 2019

    @dpogue
    Member

    This has been released in cordova-android@8.0.0.

  13. elmbrent commented on Apr 27, 2019

    @elmbrent

    I'm on latest cordova and I get the same issue.

  14. giacomocerquone commented on Apr 27, 2019

    @giacomocerquone

    No I don't, remove platform and add it again with @8.0.0

  15. julioalberto64 commented on May 1, 2019

    @julioalberto64

    Linux
    mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/linux-x86_64
    MacOS
    mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/darwin-x86_64
    Windows
    mkdir %ANDROID_HOME%\ndk-bundle\toolchains\mips64el-linux-android\prebuilt\windows-x86_64
    The ANDROID_HOME environment variable points to the the root of the Android SDK installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions