Android.mk

1) 完全Android代码生成APK

修改:NewKeyTest 改成你的项目名或应用程序名,即最后生成的NewKeyTest .APK

 生成路径out/target/product/项目/system/app/NewKeyTest.apk

 1 LOCAL_PATH:= $(call my-dir) //宏"my-dir"由编译系统提供,用于返回当前路径
2 include $(CLEAR_VARS) // 清空编译器的全局变量 当然LOCAL_PATH(未清理),可以打开clear_vars.mk文件查看
3
4 LOCAL_MODULE_TAGS := optional
5
6 LOCAL_SRC_FILES := $(call all-java-files-under, src)
7
8 LOCAL_PACKAGE_NAME := NewKeyTest
9 LOCAL_CERTIFICATE := platform
10
11 include $(BUILD_PACKAGE)
12
13 # Use the following include to make our test apk.
14 include $(call all-makefiles-under,$(LOCAL_PATH))

2) 包含外部jar包生成APK

修改:NewKeyTest 改成你的项目名或应用程序名,即最后生成的NewKeyTest .APK

arityssll.jar 为外部jar包

 生成路径out/target/product/项目/system/app/NewKeyTest.apk

 1 LOCAL_PATH := $(call my-dir)
2 include $(CLEAR_VARS)
3
4 LOCAL_MODULE_TAGS := optional
5
6 LOCAL_STATIC_JAVA_LIBRARIES := libarity
7
8 LOCAL_SRC_FILES := $(call all-java-files-under, src)
9
10 LOCAL_SDK_VERSION := current
11
12 LOCAL_PACKAGE_NAME := NewKeyTest
13
14 include $(BUILD_PACKAGE)
15 ##################################################
16 include $(CLEAR_VARS)
17
18 LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libarity:arityssll.jar
19 include $(BUILD_MULTI_PREBUILT)
20
21 # Use the folloing include to make our test apk.
22 include $(call all-makefiles-under,$(LOCAL_PATH))




posted on 2012-02-16 17:40  RTFSC  阅读(523)  评论(0编辑  收藏  举报

导航