第一步:编写Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := Bluetooth
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
第二步,在加入编译的mk文件里给PRODUCT_PACKAGES追加上我们需要加入编译环境的apk名,这里是Bluetooth,如:
test.mk
PRODUCT_PACKAGES := \
Bluetooth \