How to compile the header file when Android uses ndk

Source: Internet
Author: User

Currently, we are studying how to use androidProgramCall C ++ localCodeWhen using javah to generate a. h file, the following error occurs: No

2. supplement the concept in Java

Java provides a package mechanism to better organize classes. A package is a class container used to separate class namespace. If no package name is specified, all examples belong to a default untitled package. Java packages generally contain related classes. For example, all classes about transportation tools can be placed in a package named transportation.

The programmer can use package to specify the specific package of the class in the source file. The package statement format is:

Package pkg1 [. pkg2 [. pkg3…];

If a package statement exists in the program, it must be the first executable statement in the source file. It can only contain comments or empty lines before it. In addition, a file can have only one package statement.

The package name has a hierarchical relationship, and each layer is separated by points. The package level must have the same structure as the file system of the Java Development System. Generally, the package name must contain lowercase letters, which are different from the naming conventions for the class name that starts with an uppercase letter and starts with an uppercase letter.

When using the package description, the program does not need to reference (import) the same package or any element of the package. The Import Statement is only used to introduce classes in other packages into the current namespace. The current package is always in the current namespace.

If the file is declared as follows:

Package java. AWT. Image

The file must be stored in the Windows Java \ AWT \ image directory or the Unix Java/AWT/image directory.

 

Related Article

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.