Android Studio uses JNI

Source: Internet
Author: User

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

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.