Android studio NDK configuration tutorial on Mac (2), androidndk

Source: Internet
Author: User

Android studio NDK configuration tutorial on Mac (2), androidndk
Android studio NDK configuration tutorial on Mac (ii) (I) Overview

In the previous NDK configuration tutorial (I), I briefly described the basic decompression and environment configuration steps for NDK in MAC.

This section describes how to configure and run android studio on MAC.

(2) Start

First, go to the path of the NDK file decompressed last time and use Android studio to import Hello-jni
After the import is complete, AS will automatically help us build the grade version.
Wait until the build is complete.

Open the file directory

In the local. properties file, we add the following sentence:

Ndk. dir =/Applications/Android-NDK/android-ndk-r10e

Change the path to your ndk based on your settings.

Click compile. If no running error occurs, the configuration is complete.

Click "run" and enter "Hello-jni" on the phone. The configuration is successful.

Note:
1. Run the NDK test program. We do not recommend using genymotion. Due to kernel version problems, the ndk program may fail to run.
2. Try to use a real machine to debug the ndk program.
3. You can use the running simulator to enable intel acceleration.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger. (For more information, see AllenCoder)

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.