build/core/Makefile:34: *** Prebuilt apk found in PRODUCT_COPY_FILES: vendor/kehwinBLE/apk/KehwinBLE_logo.apk:system/app/KehwinBLE_logo.apk, use BUILD_PREBUILT instead!.
make: *** [out/build-p212.ninja] Error 1
在apk同级目录上创建一个Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := KehwinBLE_logo
LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := ./KehwinBLE_logo.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := platform
include $(BUILD_PREBUILT)
编译生成到system/priv-app/KehwinBLE_logo/KehwinBLE_logo.apk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := KehwinBLE
LOCAL_SRC_FILES := KehwinBLE.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := .apk
LOCAL_BUILT_MODULE_STEM := package.apk
LOCAL_CERTIFICATE := platform
include $(BUILD_PREBUILT)
编译后生成在system/app/KehwinBLE/KehwinBLE.apk
且在关键字PRODUCT_PACKAGES上加上 KehwinBLE_logo \
PRODUCT_PACKAGES += \
audio.primary.default \
audio_policy.default \
audio.dia_remote.default \
audio.iton_remote.default \
KehwinBLE_logo \
local_time.default \
vibrator.default \
power.default
PRODUCT_PACKAGES += \
audio.primary.default \
audio_policy.default \
audio.dia_remote.default \
KehwinBLE \
local_time.default \
vibrator.default \
power.default