Android源码编译jar包BUILD_JAVA_LIBRARY 与BUILD_STATIC_JAVA_LIBRARY的区别(一)
http://www.cnblogs.com/zhhd/p/5392913.html
上面是参考文章的链接,下面是我的编译脚本(Android.mk):
1.编译出来eclipse可以用的jar包(在\out\target\common\obj\JAVA_LIBRARIES\upgradeservice_intermediates\javalib.jar),里面是class文件
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := upgradeservice
LOCAL_MULTILIB := 32
include $(BUILD_STATIC_JAVA_LIBRARY)
2.编译出来在out/../framework/upgradeservice.jar,里面是dex格式
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := upgradeservice
LOCAL_MULTILIB := 32
include $(BUILD_JAVA_LIBRARY)