You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Anatoly Shirokov, catcarbon, Kleber Silva, Giacomo Cerquone, Rafael Hengles, Peter Holcomb, Iago Laguna, sepehrr, Hudson, Ahn Sung-dae and 1 more
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.
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.
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.
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
Reacted by Neil Palethorpe, Potter Dai, CHAPELLE Quentin, Matthias Fischer, Ngoc Dao, log2c, Eduardo Pinheiro, Василий, freakypie, Zach Lyon and 7 more
@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:
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.
Reacted by Mario Juárez, Christian Guevara, Michele Belluco, tfmeads, Liuting Du, Thiago Andrade, AnYu_HAPPY, Peter Horsley, Williaan Lopes and Rahul Singh
Reacted by Michele Belluco, Ruan Lopes de Andrade, Liuting Du, Yossi Neiman and Thiago Andrade
Activity
janpio commentedon Sep 21, 2018
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.
bugsmafia commentedon Sep 21, 2018
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'
bugsmafia commentedon Sep 21, 2018
https://android.googlesource.com/platform/ndk/+/ndk-release-r18/CHANGELOG.md
ubergeek77 commentedon Sep 25, 2018
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.
Updates for latest gradle/build tools
Updates for latest gradle/build tools
ndarilek commentedon Oct 24, 2018
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.
Meithal commentedon Oct 24, 2018
The workaround is to download the older NDK and replace the currently ndk installed in your android Sdk directory with it.
Updates for latest gradle/build tools
Updates for latest gradle/build tools
Updates for latest gradle/build tools
Updates for latest gradle/build tools
Updates for latest gradle/build tools
dpogue commentedon Nov 21, 2018
This has been fixed in master and will be released in the next major version of Cordova Android.
carlosascari commentedon Jan 14, 2019
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
Changing
3.0.1to3.1.0in thebuild.gradlefile So it looks like:classpath 'com.android.tools.build:gradle:3.1.0'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.zipIt appears that
gradle-wrapper.propertiesis overwritten with 4.1 by the following code:ngocdaothanh commentedon Feb 25, 2019
@dpogue Has it been released yet? If no, can you release it very soon?
I'm having the problem mentioned in this issue.
cordova -von my Mac gives8.1.2 (cordova-lib@8.1.1).ngocdaothanh commentedon Feb 25, 2019
@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 androidfrom command line, I need to use a newer version:dpogue commentedon Feb 25, 2019
This has been released in cordova-android@8.0.0.
elmbrent commentedon Apr 27, 2019
I'm on latest cordova and I get the same issue.
giacomocerquone commentedon Apr 27, 2019
No I don't, remove platform and add it again with @8.0.0
julioalberto64 commentedon May 1, 2019
Linux
mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/linux-x86_64MacOS
mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/darwin-x86_64Windows
mkdir %ANDROID_HOME%\ndk-bundle\toolchains\mips64el-linux-android\prebuilt\windows-x86_64The ANDROID_HOME environment variable points to the the root of the Android SDK installation.