Android NDK use

Source: Internet
Author: User

>

Environment Construction Reference Baidu experience (not verified):

1. build the corresponding class in the Android project, then compile the CD into the bin\classes directory of the project in the cmd window , and use the Javah–jni All-restricted class name generate the corresponding header file

2. Right- Click the project in Eclipse, Android tool–>add Native support. , enter the name of the corresponding library;

3. Copy the header file generated in Step 1 into the automatically generated jni folder

4. If you encounter include<jni.h> as unresolved inclusion, right-click in the project,build Path->config.

Then refresh.

5. Modify The compilation source of the Mk file under the Jni folder , if the auto-generated CPP file is not used, it can be deleted, or the auto-generated CPP Contains its own header file (not verified);


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.