Android build targets "No toolchains found in the NDK toolchains" - android

I am trying to build an old project and something has changed where the project tries to target mips64el-linux-android. I don't reference this build targets within in build variants and it's not the sdk build version I specify in the project properties panel. Even so, I do have the native sdk installed so it should build in this case.
Any ideas?

1.Donwload NDK package
2.Open the "toolchains" folder after unzipping
3.Compare with android-sdk->ndk-bundle->toolchains folder
4.Find the missing folder and copy it in the past
5.Recompile

Which NDK version are you using? Google has dropped mips support in NDK r17.
You need to download older NDK for older projects. I use NDK r10e and sometimes r14 for my older projects. If project is too old you can try with r10.
In your project build script you need to specify downloaded NDK's path. You need to download and manually extract NDK (I believe Android Studio will not download older version).

Related

Disable NDK build in gradle for specific project

I have an android library project that builds lib.aar artefact and an app project that imports this lib.aar after it was built. lib.aar requires NDK 17 to be built since it has some C++ 17 code.
I manage to build .aar file successfully but the app fails to compile with this message:
A problem occurred starting process 'command '/Users/user/Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip''.
This is caused by the fact that NDK 17 removed support for MIPS and I can't upgrade to a newer version of android studio that uses NDK 18beta
If I remove the content of '/Users/user/Library/Android/sdk/ndk-bundle' folder, deleting the NDK, then the app builds without errors and I can use lib.aar code inside the app.
So far I've tried this: How do I disable the NDK build in Android Studio 1.0.1 , this https://gist.github.com/ph0b/9e59058ac59cac104398 . Setting env variable ANDROID_NDK_HOME to a dummy folder works, the app builds, but it's kind of a hack.
Is there any way to programmatically disable NDK build for the app project without deleting NDK folder?
This is caused by the fact that NDK 17 removed support for MIPS and I can't upgrade to a newer version of android studio that uses NDK 18beta
r18 won't fix this problem either; it still doesn't have mips support. The fix to the problem is upgrading the gradle plugin version in your application to at least 3.1, which is the minimum required for NDK r17 (and, extremely unfortunately, is required for even having the NDK installed for some reason).
The other solution here would be to install NDK r16b somewhere and then point at it from the app's local.properties, letting the aar pick from the SDK. If you're just working on a local build this will work, but since local.properties shouldn't be checked in to version control it won't help others much.

Qt does not detect Android NDK

I want to develop Android apps with Qt. I have Extracted the Android SDK and NDK to C:\. This is the NDK I downloaded:
https://squeak-android-vm.googlecode.com/files/android-ndk-1.6_r1-windows.zip
But Qt 5.2.1 does not detect the NDK and this error is shown:
"C:\android-ndk-1.6_r1" does not seem to be an Android NDK top folder.
Do I downloaded a wrong NDK? Did I miss something?
Thanks
First of all I strongly recommend to install the latest version of Qt for Android (5.4.1 at present). Also you should download and install Android SDK (ver. 22+) and NDK (ver. r9+) from here.
After downloading extract them. For Android SDK you should have a connection to Internet and download the desired tools. you have to install at least Android API-13! You should also install Android SDK Platform-tools and Android SDK Build-tools.
I had the same problem. The problem was I first created a Android NDK folder to extract the Android NDK files into it. The extraction procession then created a sub folder of the same name. To solve the problem, I moved the sub folder one directory level up and deleted the initial Android NDK folder I first created.

Installing version 16 of the Android SDK tools

I'm trying to build a project in Android Studio that targets API16 (Android version 4.1.2). Using the SDK manager I was able to download that SDK platform but an exception is raised at compile-time as it's trying to parse a compiled .jar file:
bad class file magic (cafebabe) or version (0034.0000)
My understanding of this issue is that I need the build tools to match the API version I'm targeting (since I currently only have the most recent version of the build tools). However, I am unable to install them because they're unavailable in both the SDK manager and on the Android website (http://developer.android.com/tools/revisions/build-tools.html). Is there another way to install this version of the build tools? (Alternatively, if installing that version of the build tools is unnecessary, how do I resolve this issue?)
This is a problem with the Java version (i.e. the version the jar, or rather the class files inside it, was compiled with). It actually has nothing to do with the Android version.
0x34 means the jar was compiled with Java 8 (see the list of possible values here). Android can only use jars compiled as Java 6.
If you have the sources for this library, you should recompile it again with the -target 1.6 flag.

Android Eclipse and configuring NDK Toolchains for project

I am using Android Eclipse ADT on Windows 8.1
I have installed both Cygwin and MinGW.
I have installed the SDK, NDK and Cocos2d-x library.
My question is that my Cocos2d-x project is expecting this toolchain library in the NDK:
ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\darwin-x86\lib\gcc\arm-linux-androideabi\4.4.3\include
I browse to the ndk\toolchains folder and I see several other versions:
arm-linux-androideabi-4.6
arm-linux-androideabi-4.8
arm-linux-androideabi-clang3.3
And a few other versions, but not the 4.4.3 version.
My question is then, should I
1) With Cygwin or MinGW compile "arm-linux-androideabi-4.4.3" and how to do this.
or -
2) With some setting in ADT should I change the version to the newest one "arm-linux-androideabi-4.8". Please direct me to this setting if this is the correct choice.
Thanks in advance for your help!
EDIT More importantly than trying to put the right NDK in there, it clearly states, "Invalid project path: Include path not found (C:\development\lib\android\ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\darwin-x86\lib\gcc\arm-linux-androideabi\4.4.3\include)"
If that was a Visual Studio error I would look for where the Project Path is being defined. Why can't I do that with Eclipse ADT?
It seems to me that you need a compiled arm-linux-arndroideabi-4.4.3 toolchain.
You can download the ndk-r8e toolchain with a compiled arm-linux-arndroideabi-4.4.3 from the following link:
32-OS: https://dl.google.com/android/ndk/android-ndk-r8e-windows-x86.zip
64-OS: https://dl.google.com/android/ndk/android-ndk-r8e-windows-x86_64.zip
Extra the zip file, you'll find android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt
Hope that helps.

Android SDK build tools

If i have two or more version of android sdk build tools as shown below then when which one will be chosen by the eclipse while building. IS it anything to with the SDK platform chosen for developing apk.
Here which one will be used either 17 or 19?
The build tools specifies the toolchain used to build Android projects. In Eclipse you can change which version is used with the project.properties file by specifying sdk.buildtools, e.g.
sdk.buildtools=17.0.0
You will probably never need to do that, as it will use the most recent installed version by default. It is not tightly coupled to the SDK version, and has only been recently split apart from the SDK itself (since version 17).
If there are different versions for Android SDK Build Tools , By default eclipse uses the most recent version of the Android Build Tools.
But if your project requirement belongs to different version(may be older) , you can do this using following steps.
In the root folder of your application project, find the project.properties file.
Open the file and specify the Build Tools version by adding a build-tools property on a separate line:
e.g. sdk.buildtools =17.0.0

Categories

Resources