When solving the problem of compiling native code in Android studio, it was found that Android studio compiled with the full Ndk-build command, with numerous parameters. So make a note here so that you can set your own parameters according to your preferences.
Parameters supported by Ndk-build compilation:
- Ndk_project_path is generally null
- App_build_script= .... Android.mk file de path
- The API level used by the APP_PLATFORM=ANDROID-XX compilation module is not normally set, but in Android studio it will be the same as the Java section version by default
- Directory of ndk_out=. obj
- Ndk_libs_out= .... The final Lib directory after compilation
- App_abi= ... Abi version. Includes all, as well as Armeabi ARMEABI-V7A x86 MIPS, etc. This item can also be placed in the android.mk.
The following is an example (involving the path part is hidden)
[Ndk_path]/ndk-build ndk_project_path=null app_build_script=...../build/intermediates/ndk/release/android.mk APP_ platform=android-19 Ndk_out=.../...../build/intermediates/ndk/release/obj ndk_libs_out=/.../...../build/intermediates/ Ndk/release/lib App_abi=armeabi
Analysis of Ndk-build supported parameters in Android