The NDK configuration tutorial for Android Studio under Mac

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 configurations are similar.

3. Operation Process

1.MAC Open terminal to get the NDK directory 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 exact path of the file, you can simply drag it to the Command Terminal window.

3. Continue with the decompression command

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

At this point in the file storage path will be a decompression after the completion of the NDK storage directory.
Effects such as:

Get instructions: Unzip the file successfully.

At this point: Open: Command terminal:

To do this, follow these steps:

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 below to test whether the configuration was successful:
1. cd hello-jni/
2. Implementation ndk-build

The following interface appears to indicate the success of the basic variable configuration:

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

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The NDK configuration tutorial for Android Studio under Mac

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.