MAC NDK Environment Setup

Source: Internet
Author: User

1 Download NDK for Mac

Http://developer.android.com/tools/sdk/ndk/index.html

2 Decompression Android-ndk-r10e-darwin-x86_64.bin

The Terminal CD directory

ndk$ chmod a+x android-ndk-r10c-darwin-x86_64.binndk$./android-ndk-r10c-darwin-x86_64.bin

Unzip the corresponding folder

Http://developer.android.com/ndk/downloads/index.html#extract

3 Configuration in Eclipse

Window > Preferences > Android >ndk > NDK loaction

4 Configuring in Environment variables

Open the current user directory. Bash_profile

Export Path=${path}:/users/zhouxiyuan/downloads/androidsdk/platform-tools/export path=${path}:/users/zhouxiyuan/ Downloads/tools/android-ndk-r10e/export Android_sdk=/users/zhouxiyuan/downloads/androidsdkexport ANDROID_HOME=/ Users/zhouxiyuan/downloads/androidsdkexport ndk=/users/zhouxiyuan/downloads/tools/android-ndk-r10e

5 compiling. So

Terminal CD Project directory

Ndk-build

Zhouxiyuandemacbook-pro:ndk_helloworld zhouxiyuan$ Ndk-build[armeabi] Compile thumb:hello <= Hello.c[armeabi] Sharedlibrary:libhello.so[armeabi] Install:libHello.so = libs/armeabi/libhello.sozhouxiyuandemacbook-pro:n Dk_helloworld zhouxiyuan$ Ndk-build[armeabi] Install:libHello.so = Libs/armeabi/libhello.sozhouxiyuandemacboo K-pro:ndk_helloworld zhouxiyuan$ Ndk-build

Generate the. So file in the corresponding Lib

It feels more convenient than windows. Cygwin used to make me so tangled. Ubuntu Development Department Reality



MAC NDK Environment Setup

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.