First of all, the vast majority of Android applications do not require C + + .
The Android NDK website writes very clearly: before downloading the NDK, you should understand that the NDK won't benefit most apps (in Before you download the NDK, you must first understand that the NDK is not effective for all apps. Developers who simply want to use C + + or NDK must understand that using C + + for so-called productivity gains is not worth the effort, and introducing C + + not only improves operational efficiency but also increases the complexity of the application. At the moment I feel that introducing the NDK has at least two drawbacks:
1. Android Studio temporarily does not support debugging C + + code (officially said the next version will support), so need eclipse, but Eclispe officially no longer support, so, I have to hit log to debug!
2. Need to have a C + + and understand Java also have a little understanding of the development of Android small partners, the capital of the programmer a bit expensive year, it is likely to be a big trouble.
I. Environment CONSTRUCTION:
1. Configure Android Studio to be self-Baidu, and the SDK JDK must be configured.
2. Download NDK: Select the appropriate NDK download on the official website, and after downloading, execute the command
chmod a+x android-ndk-xxx.bin. /android-ndk-r10c-xxx.bin
NDK will automatically unzip to the new directory
3. Configure the NDK environment variables
1 Export android_ndk=/home/lishaokai/android-ndk-r10d
2 Export path= $PATH: $ANDROID _ndk
4. Testing the NDK
1 [email protected]:/home$ ndk-build2find Application project directory! 3 Android ndk:please Define the Ndk_project_path variable to the it. 4 /home/lishaokai/android-ndk-r10d/build/core/build-local.mk:148: * * * Android ndk:aborting . Stop.
If the above error is displayed, the NDK installation is successful.
Android and NDK C + + Development Series 1 "Linux Environment Building"