最近在做android BSP 4.2的时候遇到一个BUG,编译user 版本的时候,系统刷进手机里面去,无限循环在开机动画,编译userdebug 刷机进去的时候发现正常,于是我先回滚到正常的版本,进系统打开adb调试,然后刷异常的版本,发现无限循环的log如下

I/dalvikvm(  823): DexOpt: not all deps represented 
 E/dalvikvm(  823): /system/framework/android.test.runner.jar odex has stale 
dependencies

为啥会出现这个BUG呢,看了一下git,发现我新增加的 FM收音机里面有一个qcom.fmradio.jar 这个并且做了如下处理

export BOOTCLASSPATH ${BOOTCLASSPATH}:/system/framework/changhong.jar

于是我google了一下错误信息,找到了一个相关帖子

https://groups.google.com/forum/#!topic/android-porting/jgJqrZ9uGXs

The optimized DEX files have inter-file dependencies.  All .odex files
depend on the bootstrap class entries, so if you add or remove entries
from the bootclasspath you must re-run dexopt over all files.

This happens automatically on -userdebug and -eng developer builds,
but -user builds don’t have the un-optimized versions of the APKs
sitting around.  So it just falls over.

The best plan is to leave bootclasspath alone.

See also dalvik/docs/dexopt.html in the source tree.

根据这个回答,我在build/core/dex_preopt.mk  里面找到了

DEXPREOPT_BOOT_JARS :=
core:core-junit:bouncycastle:ext:framework:telephony-common:voip-common:mms-common:android.policy:services:apache-xml

修改成:

DEXPREOPT_BOOT_JARS :=
core:core-junit:bouncycastle:ext:framework:telephony-common:voip-common:mms-common:android.policy:services:apache-xml:changhong

注意最后面那个。

删除out/target/product/device/system,重新编译打包,刷机,正常进入系统!!

最新文章

  1. Linux 共享内存详解一
  2. JAVA CDI 学习(1) - @Inject基本用法
  3. ACM/ICPC 之 网络流入门-Ford Fulkerson与SAP算法(POJ1149-POJ1273)
  4. 教你如何利用分布式的思想处理集群的参数配置信息——spring的configurer妙用
  5. galera cluster DDL节点间状态不一致的问题
  6. Android核心分析之二十五Android GDI之共享缓冲区机制
  7. [置顶] Android Provision (Setup Wizard)
  8. Android Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt
  9. ip协议的数据分片备忘
  10. MVC 上传图片的解决方案
  11. Sublime Text 2使用心得
  12. PHP环境搭建——Apache
  13. C# 文件去仅仅读工具-线程-技术&分享
  14. ios 适配iOS11&iPhoneX的一些坑
  15. 创建 elasticsearch 用户
  16. instrument之Time Profiler总结
  17. (2)Python3笔记 数据类型之"组"(序列) 与 集合
  18. oracle 排序 row_number() over(partition by 排序字段)
  19. 【做题】arc070_f-HonestOrUnkind——交互+巧妙思维
  20. 2016 版 Laravel 系列入门教程

热门文章

  1. [UWP]使用Acrylic(亚克力)
  2. 【t011】最小覆盖子串
  3. 看看是不是你想要的:pycharm永久激活!!!
  4. 允许svn服务与WINDOWS自己主动启动
  5. WPF公章制作之2
  6. 简明Python3教程 2.序言
  7. 计算机的组成 —— PCI(PCIE)、PCB
  8. ZOJ 3819 Average Score(数学 牡丹江游戏网站)
  9. error: stable identifier required, but $iwC.this.$VAL4.sqlContext found.
  10. WPF ListView控件设置奇偶行背景色交替变换以及ListViewItem鼠标悬停动画