在android源码中添加第三发jar文件(可参考Calulater)
1.将jar文件放在该模块的根目录下
2.创建Android.mk文件(内容如下)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := libarity
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SDK_VERSION := current
LOCAL_PACKAGE_NAME := 模块名
include $(BUILD_PACKAGE)
##################################################
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libarity:jar包名.jar
include $(BUILD_MULTI_PREBUILT)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
注:LOCAL_STATIC_JAVA_LIBRARIES := libarity
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libarity:jar包名.jar
中的libarity名字必须要一致,并且该名字(libarity)在其他模块中没用到,如果用到的话会报错误,只需改成其他名字即可