在Android打包过程中,遇到这个问题,所以搜索了下在stackoverflow上找到一个解决方案。

解决方案:
It looks like ADT 21 adds a folder to your bin called dexedLibs which ought to speed up deployment by putting jars and libraries in precompiled dex code. I had two versions of the support library there, so I deleted all the files in the folder and built again and it worked. If I try to build with any files in there the build fails though, so I have to delete them before each export. I’m using ActionBar Sherlock and that may be conflicting with the dexedLibs thing because it won’t show up there unless the folder is initially empty.

Edit: I had been using ActionBarSherlock when this problem first came up, but have recently switched to ActionBarCompat. Since the switch, I no longer have to delete the dexedLibs folder when exporting. Looks like maybe ActionBarSherlock was to blame, but I can’t be certain.

意思就是ADT21在我们的bin目录下增加了一个名为dexedLibs的文件夹,它将jar包和libraries放在这里加速打包,这就有两个版本的library,所以删除dexedLibs文件夹即可。

  • dexedLibs目录ADT21以后为了加快编译工程的速度引入的,主要是一些外部库的编译文件,因为在这之前每次Run工程都会编译这些外部库,而ADT21以后就可以一次编译,多次使用了。
  • 刚做了实验,直接把lib文件丢到libs目录中是在Android Private Libraries,这也是ADT21以后加入的,好像会自动把JAR分成Android Private Libraries和Android Dependencies两类。最好都保留。

更多相关文章

  1. android-JNI
  2. android的system.img,userdata.img,ramdisk.img分析
  3. Android(安卓)文件系统路径
  4. android UI设计器-droiddraw
  5. Please ensure that adb is correctly located at...问题解决
  6. android 用ExpandableListView实现的文件目录树框架
  7. 【Android】导入第三方库时,关于so文件的一些思考
  8. c++ for Android(安卓)----- ndk 编译链接 pthread 报错
  9. Android(安卓)DataBinding 基础使用

随机推荐

  1. 区分MySQL中的空值(null)和空字符('&#39
  2. 详解MySQL数据库之触发器
  3. Datagrip2020下载MySQL驱动失败的问题
  4. MySQL如何通过Navicat实现远程连接
  5. 一次Mysql使用IN大数据量的优化记录
  6. 详解mysql慢日志查询
  7. mysql8.0.20配合binlog2sql的配置和简单
  8. MySQL索引失效的几种情况汇总
  9. 详解MySQL 聚簇索引与非聚簇索引
  10. MySQL 索引的优缺点以及创建索引的准则