Multiple dex files define Lcom/google/zxing/BarcodeFormat
解决zxing “Could not find class 'com.goole.zxing.Result”和“Multiple dex files define”问题
一是运行时遇到“Could not find class 'com.goole.zxing.Result'”错误。解决办法如下:
1、在工程根目录下新建libs文件夹,然后将core.jar粘贴到libs下(我想这一步大家都是做了的);
2、build path->Libraries->点击Add JARs...(注意不是点击Add External JARs...)->选择你所在的工程->选择第一步新建的libs文件夹->选中第一步我们粘贴的core.jar->点击Ok;
3、选中libs文件夹->右击,然后选择Build Path->use as source folder。
第一个问题到这里就解决了。你天真的以为就能顺利运行了?错了,程序压根没跑起来。第二个问题来了。
第二个问题是“Unable to execute dex: Multiple dex files define Lcom/google/zxing/BarcodeFormat;”。很多中文blog里都包含解决方法,吧啦吧啦吧啦说了一大推,但是都不起作用。后来在stackoverflow上找到了解决方法(不得不说stackoverflow是一个非常棒的网站),链接地址为:http://stackoverflow.com/questions/7870265/unable-to-execute-dex-multiple-dex-files-define-lcom-myapp-rarray。答案目前已经有156个赞同了。
我用的是链接上的这种方法:In Order and Export tab I did not have any jar library there, so I have unchecked Android Private Libraries item. Now my project is running. 翻译过来就是,Build Path->Order and Export->然后将Android Private Libraries前面那个钩去掉->点击OK。
重新运行,程序工作正常。不过还是遇到了网上同学的问题,扫描的时候要很远才能扫描到二维码,而且感觉扫描不敏感,扫描半天才成功一次,OMG。后续还得花时间把这些问题解决。
Multiple dex files define Lcom/google/zxing/BarcodeFormat的更多相关文章
- android开发学习——Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/BarcodeFormat;
在Android Studio中,sync project没有错,但是run时会报错; http://blog.csdn.net/q568430333/article/details/50969033 ...
- Multiple dex files define Lcom/google/gson/internal/Streams$AppendableWriter$CurrentWrite;
开发中引入第三方 aar 时编译同过,运行时出现问题: Multiple dex files define Lcom/google/gson/internal/Streams$AppendableWr ...
- 解决com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;
我在开发Windows Azure的Mobile Service(隔天补上创建过程)的安卓客户端时,报出了com.android.dex.DexException: Multiple dex file ...
- Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/adp;
Q:版本号不对,广告插件的版本号和项目中用的版本号不一致 A:adsplugins的build gradle里面用的版本号是10.0.1,修改app的build gradle 的google类都改成1 ...
- Unable to execute dex: Multiple dex files define Lcom/gl
[2015-04-16 17:42:04 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/gl/softphon ...
- Multiple dex files define Lcom/sina/sso/RemoteSSO错误解决办法
在安卓上遇到了Multiple dex files define Lcom/sina/sso/RemoteSSO的编译错误 在网上找解决办法 搜到了解决办法是这样的 方案1:Eclipse->P ...
- unity3d android导出项目编译Multiple dex files define Lcom/unity3d/player/UnityPlayerActivity
unity3d版本: 4.1.2 在导出android工程进行编译时,发现出现Multiple dex files define Lcom/unity3d/player/UnityPlayerActi ...
- Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files defi ...
- Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;
Unable to execute dex: Multiple dex files define Lcom/myapp/R$array; 我这个问题最后解决方式是,吧工程里面用同一个v4包. 很明显, ...
随机推荐
- Couchbase的安装步骤
本指南将在几分钟内让你上手,探索关联APP,在命令行shell 中删除一些实例查询,并尝试查询工作台. 下载Couchbase Server 下载地址:http://www.couchbase.com ...
- bzoj2038小z的袜子
用平面曼哈顿距离最小生成树或者莫队算法都可以吖QwQ~ 然而显然后者更好写(逃~) 莫队怎么写就看图吧QwQ~ 话说我一开始没开long long然后拍了3000组没拍出错交上去Wa了QAQ #inc ...
- [转载]java int与integer的区别
声明: 本篇文章属于转载文章,来源:
- 利用HTML5定位功能,实现在百度地图上定位
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- <<< Oracle表空间创建、修改、删除基本操作
ORACLE 中,表空间是数据管理的基本方法,所有用户的对象要存放在表空间中,也就是用户有空间的使用权,才能创建用户对象 create tablespace myts //建立表空间,名为mytsd ...
- MySQL中日期与时间类型
http://blog.sina.com.cn/s/blog_4d8730df01014jiy.html
- Maven:将Jar安装到本地仓库和Jar上传到私服
1.依赖如下: <dependency> <groupId>org.quartz-scheduler.internal</groupId> <artifact ...
- WinForm------GridControl单元格内容修改外表样式
private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDra ...
- code::blocks编译出错
问题描述: 在windows xp 上编译的cbp项目(已经生成.obj文件),放到fedora上无法顺利编译.(build) collect2:error: ld returned 1 exit s ...
- [Unity3D]添加音效说明
添加音效组件并添加音乐资源 其中Pitch用来提高和降低音调的,比如可以和赛车游戏的轮胎绑定,当轮胎越快,则音调越高 2D/3D音效:2D音效和摄影家的距离无关,可以看做是一个背景音乐:而3D音效则是 ...