i want to use cmake which version is 14.0,but i can not find this version in android sdk manager
i go to the cmake official website,and i find some cmake to download, like this:
https://github.com/Kitware/CMake/releases/tag/v3.14.0
but i cannot find android.toolchain.cmake script in theses version's cmake.
Is there some place to find 14.0 version cmake for android or am i misunderstand how to use it?
thanks advance~
If you want the latest CMake, then you should use the official distribution of CMake.
There is no such thing as "CMake for android"
The android.toolchain.cmake file you're talking about is actually shipped inside the NDK
Installing the NDK should be enough to have required CMake android configuration files.
As I can see from the screenshot, your NDK is not installed.
Related
I am trying to install NDK in Android Studio 3.2.1 and I am following the procedure described here
It says I need to select LLDB, Cmake and NDK form the list in the SDK Manager,but I can only see LLDB and NDK in my computer, and CMake is absent
What do I need to do to install CMake and start coding using C? Or is installing just LLDB and NDK enough?
According to the docs on developer.android site:
Android Studio supports CMake, which is good for cross-platform projects, and ndk-build, which can be faster than CMake but only supports Android. Using both CMake and ndk-build in the same module is not currently supported.
You can only use one of the Cmake or NDK(as you see NDk is better but only developed for Android).
here is link of documentation for more info.
If you still have problem with installing cmake by sdk manager, make sure you are using 64 bit version of android studio.
for more information about how you can install Cmake or NDK you can see this answer
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).
I am constantly getting this warning while building my android studio code using terminal command gradle clean assembleRelease:
Unable to strip library 'lib.so' due to missing strip tool for ABI 'ARMEABI'. Packaging it as is.
Please help me on how to get this warning resolved.
Note: I know this won't affect the behaviour of my app, but my APK is too bulky and this will surely help me reduce APK size. So I need this resolved.
The default installed NDK doesn't seem to have the tools required to strip binaries that have been built with ARMEABI support, so it ends up packaging the whole library, which increases the built file size substantially.
I've found that installing the "NDK (Side by side)" tool from Android Studio -> Tools -> SDK Manager -> SDK Tools takes care of this warning and also reduces the built APK size, especially for React Native projects.
Steps to install NDK (Side by side)
Open Android Studio
Click Configure/ Tools
Click SDK Manager
Click SDK Tools tab
Select below:
NDK (Side by side)
CMake
Android SDK Command-line Tools (latest)
Apply
NOTE: Android SDK Command-line Tools (latest) is not needed but I installed it so that I don't have to search for more solutions, today has been a lot of troubleshooting to run a new React Native app.
More info: https://developer.android.com/studio/projects/install-ndk
You can try using the following configuration in app/build.gradle.
android {
packagingOptions {
// exclude ARMEABI native so file, ARMEABI has been removed in NDK r17.
exclude "lib/armeabi/**"
}
}
Remove (or make optional) MIPS native library #3504
Android-ABIs
A possible solution specifically for React Native:
I got this problem when trying to build my React Native application from the command line by executing cd android/ && ./gradlew assembleDebug (without having Android Studio open).
I opened Android Studio, I built the app there and it automatically fixed the problem. Once I tried again by command line the problem was not happening anymore.
I'd like to combine all the existing answers and add some more explanation/details.
First of all, just like other people mentioned, check that you have Android NDK installed (NDK (Side by side) in Android Studio -> Tools -> SDK Manager -> SDK Tools). But it's still not enough to fix this warning.
There's a list of supported ABIs by Android NDK and it has a note saying that 'armeabi' is no longer supported:
Historically the NDK supported ARMv5 (armeabi), and 32-bit and 64-bit MIPS, but support for these ABIs was removed in NDK r17.
So, if your app needs to support ARMv5/6 devices (which is unlikely - those are pretty old), you should either:
Use older NDK <r17 that supports 'armeabi' ABI (choose another version in SDK Manager)
Ignore the warning. In this case, the library will still work on older devices even with newer NDK but will be packed in APK for every ABI, including the newer ones (which leads to increased APK size)
If there's no need in supporting ARMv5/6, you might still want to support ARMv7 ABI 'armeabi-v7a'. Once again, there are two options:
Recompile the shared library with a newer Android NDK that supports 'armeabi-v7a' ABI
(Not recommended) Rename 'armeabi' folder to 'armeabi-v7a' (I'm not sure whether libraries for these ABIs are compatible or not)
If the library doesn't belong to you, you should probably ask its maintainer to fix it.
But if there's no need in supporting even ARMv7, feel free just to exclude the libraries:
android {
packagingOptions {
exclude "lib/armeabi/**"
}
}
i am using windows 7-64bit OS
Want to integrate NDK, Get help from NDK installation steps
Cannot find out Cmake which required for Ndk
Can any one help me to get Cmake, without cmack its giving error
Find screen of sdk tools
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.