The first step is to create a new project
The NDK needs to be configured after creation is complete
Click File->project Structure in the Select SDK location in the Android ndk location to specify your downloaded NDK
If you don't download the NDK then
Select File->settings Appearance & Behavior, System Settings->android SDK Download If you don't have FQ then install a xx-net github open source Project
Step Two
Step three into the Java folder
Use the following command
You will then see a. h C + + header file under a Jni folder that appears under the Java sibling directory
The fourth step is to create a. C folder
And then call it in your program. I wrote a button and clicked the string returned by the log output C.
PS: I am also a beginner
Attach your project Baidu Cloud Link: http://pan.baidu.com/s/1eRHK7gm Password: 7z7c
Android Studio uses JNI