The NDK configuration tutorial for Android Studio under Mac (i)

Source: Internet
Author: User

The NDK configuration tutorial for Android Studio under Mac (i) 1. Overview
     近期项目全线转移到Mac下使用使用Android studio开发。

遇到关键代码封装到 ***native***层,此时在win下的NDK配置步骤所有失效。

为此,花费了大量时间用来查阅资料,在此,记录下来,分享给大家供以后配置中作为參考。

2. Environment

The development configuration I use is: MAC OS 10.10 +androioid Studio 1.2+android-ndk-r10e-darwin-x86_64+git.

Other configuration similar operation is possible.

3. Operation Process

1.MAC Open terminal to get the NDK folder permissions

chmod a+x Android-ndk-r10c-darwin-x86_64.bin
The path behind the file is stored.

2.CD path.

CD path.
If you do not know the detailed path of the file, you can drag it directly to the command terminal form.

3. Continue to run the unzip command

./android-ndk-r10c-darwin-x86_64.bin

At this point in the file storage path will be a complete decompression of the NDK storage folder.


Effects such as:

Get instructions: Unzip the file successfully.

At this point: Open: Command terminal:

Follow these steps, for example:

1. Enter the command pico .bash_profile
2. export NDK_ROOT=/Applications/Android-NDK/android-ndk-r10e
3. export PATH=$PATH:$NDK_ROOT
Last Save (control+x) Select Y

4. Update the newly configured environment variable inputsource .bash_profile

Validation successful

1. Enter under Terminal
Under the NDK under the sample folder

Follow the steps for example to test whether the configuration is successful:
1. cd hello-jni/
2. Running ndk-build

The following interface appears, for example, to indicate that the basic variable is configured successfully:

I will continue in Tutorial II to explain how to configure the steps used in Android studio.

The NDK configuration tutorial for Android Studio under Mac (i)

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.