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)