ApiDemoes.apk对于预览APIs效果和学习其用法有很大的帮助,但它默认是没有被编译的,虽然可以手动模块编译然后手动安装到系统,但每次都这样操作未免过于麻烦,因此本文介绍如何将其配置为默认编译并安装到系统,以便于后续使用。
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := samples tests # 瞧这里
# Only compile source java files in this apk.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
src/com/example/android/apis/app/IRemoteService.aidl \
src/com/example/android/apis/app/IRemoteServiceCallback.aidl \
src/com/example/android/apis/app/ISecondary.aidl \
LOCAL_PACKAGE_NAME := ApiDemos
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
# @file: development/samples/ApiDemos/An