为什么8155源码编译出来没有原生Settings,只有CarSettings?
1.首先查看out
看下out下是否有Settings.apk的生成,经查询,并没有生成Settings.apk.
2.然后查看源码
我们找到源码位置看下编译文件
源码位置:apps/LINUX/android/packages/apps/Car/Settings/Android.mk
ifneq ($(TARGET_BUILD_PDK), true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# To avoid build errors, build empty package for non-platform builds
# (for example, projected). See b/30064991
ifeq (,$(TARGET_BUILD_APPS))
LOCAL_PACKAGE_NAME := CarSettings
###############
LOCAL_OVERRIDES_PACKAGES := Settings
###############
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src)
从上面看到了一句: LOCAL_OVERRIDES_PACKAGES := Settings,此变量的作用是可以使其他的模块不加入编译,这里意思是不让Settings模块进行编译.所以out下没有生成.
3.修正源码
注释掉 LOCAL_OVERRIDES_PACKAGES := Settings,然后make
4.验证
adb push CarSettings /system/priv-app/C
|