Android NDK generates the C/C ++ header file in eclipse, androidndk

Source: Internet
Author: User

Android NDK generates the C/C ++ header file in eclipse, androidndk

We know that in Android NDK development, it is complicated and redundant to make the native function name and parameter list consistent with the original definition of the java class file, because JDK comes with a command line tool named javah to execute tasks, javah can parse Java class files for native methods and generate header files composed of native method declarations. However, switching back and forth to the command terminal during development is cumbersome. Today's blog post will explain how to generate header files in eclipse.

(1) Open Eclipse IDE and choose Run | External Tools deployments from the top menu bar. in the External Tools deployments dialog box, select Program, click the New launch configuration button, click the Main tab, and fill in the configuration as shown in figure (1:

Figure (1)

(2) switch to The Refresh tab, select the Refresh resource upon completion check box, and select The project containing the selected resource in The list, as shown in (2:

Figure (2)

(3) switch to the Common tab, and select the check box External Tools under the Display in favorites menu group, as shown in (3:

Figure (3)

Click OK to save the external tool configuration. So far, the method for generating the C/C ++ header file in eclipse has been configured.

The testing process is as follows:

Note: $ {env_var: D: \ AndroidSdk_x86_64 \ sdk}. replace this with your own sdk path.

Reprinted please indicate the source: http://blog.csdn.net/android_jiangjun/article/details/45104581

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.