標籤:
原文網址:http://blog.csdn.net/leonan/article/details/8629561
全編andorid後,單獨修改編譯一個framwork模組,make snod會有如下警示資訊:
Warning: with dexpreopt enabled, you may need a full rebuild
使用這樣make snod 出來的鏡像,核心不能啟動,模擬器一直停留在“android”標誌狀態。
查看log發現有如下錯誤列印:
DexOpt: mismatch dep signature for ‘/system/framework/framework.odex
查看makefile有這樣的語句
# Enable dex-preoptimization to speed up the first boot sequence
# of an SDK AVD. Note that this operation only works on Linux for now
# 看起來這是一項為了加快第一次啟動速度的特性
ifeq (true,$(WITH_DEXPREOPT))
$(warning Warning: with dexpreopt enabled, you may need a full rebuild.)
endif
修改方法1:
build/target/board/generic/BoardConfig.mk
ifeq ($(HOST_OS),linux)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true #把這個改為false
endif
endif
修改方法2:
全編譯的時候載入參數
make showcommands WITH_DEXPREOPT=false
這樣編譯出來的結果,如果以後單獨修改打包運行,就不會有上述問題了。
【轉】單獨編譯android framework模組出現的問題