android系統(tǒng)中內(nèi)置app:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Module name should match apk name to be installed
LOCAL_MODULE := Demo
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_PRIVILEGED_MODULE := false
LOCAL_MODULE_TARGET_ARCH := arm
LOCAL_DEX_PREOPT := false
LOCAL_PREBUILT_JNI_LIBS_arm := \
? ? @lib/armeabi-v7a/libdemo.so \
? ? @lib/armeabi-v7a/libbug.so \
LOCAL_MULTILIB := 32
include $(BUILD_PREBUILT)
內(nèi)置后一直報:Verification error in 和Had a hard failure verifying all classes, and was asked to abort in such situations.
找到原因:apk要預(yù)置進源碼的時候锻霎,會對apk進行一個解析,會生成odex文件用于加快apk的運行,但是基于高版本的sdk開發(fā)的apk里面的一些資源是無法被低版本正確的解析的窟扑,解決的范式是在mk文件里面不對該apk進行odex的處理昼扛。LOCAL_DEX_PREOPT := false