Android Training Course (42)

Source: Internet
Author: User

<! -- @ Page {margin: 2 cm} P {margin-bottom: 0.21} -->

The Android. mk file is used to describe the project organization and Compilation Method to the compilation system. It is actually a small part of the GNU make file, which will be parsed once or multiple times by the compilation system.

The content of this file is as follows:

 

LOCAL_PATH: = $ (call my-dir)

This line is used to specify the current directory, that is, to assign the current directory $ (call my-dir) to the variable LOCAL_PATH, so that you can find the source code and the corresponding resource file.

 

 

Include $ (CLEAR_VARS)

Clear the temporary variables used previously.

 

 

LOCAL_STATIC_JAVA_LIBRARIES: = libarity

Use a static JAVA library named libarity.

 

 

LOCAL_SRC_FILES: = $ (call all-java-files-under, src)

This indicates the file to be compiled, that is, the file list of the source code. Compile the java source code in all src directories.

 

 

LOCAL_PACKAGE_NAME: = Calculator

This indicates the name of the compiled package. The name of the computer package is calculator.apk.

 

 

Include $ (BUILD_PACKAGE)

Here is the rule for compiling and generating packages. Its definition is also defined in config. mk, as follows:

BUILD_PACKAGE: = $ (BUILD_SYSTEM)/package. mk. This file defines in detail how to generate a package file.

 

######################################## ##########

Include $ (CLEAR_VARS)

Clear the temporary variables used previously.

 

 

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES: = libarity: arity-1.3.3.jar

Include $ (BUILD_MULTI_PREBUILT)

Compile the dependent library in advance.

 

 

# Use the folloing include to make our test apk.

Include $ (call all-makefiles-under, $ (LOCAL_PATH ))

Generate a test package.

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.