Android and NDK C + + Development Series 1 "Linux Environment Building"

Source: Internet
Author: User

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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.