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包. 很明显, ...
随机推荐
- js 获取时间间隔
现在感觉sublime IDE 用着比较方便,也比较美观,不知道大家用的是啥ide.
- HtmlUnit初探
HtmlUnit是一个用java实现的浏览器,是一个无界面的浏览器(headless browser),跟phatomJS好像是同一类事物. HtmlUnit基于apache httpClient,而 ...
- SharpPcap网络包捕获框架的使用--实例代码在vs2005调试通过
转自:http://hi.baidu.com/boyxgb/blog/item/89ac86fbdff5f82c4e4aea2e.html 由于项目的需要,要从终端与服务器的通讯数据中获取终端硬件状态 ...
- QQ个人文件夹中的文件被占用,解决办法
我的情况是记住密码的账号不可以登录,不记住密码的账号确可以登录,突然就这样,我也很郁闷. 找到路径C:\Users\Public\Documents\Tencent\QQ下的UserDataInfo. ...
- 解决:Linux版百度云客户端 BCloud网络错误 问题
国内很多云盘渐渐停止服务支持,如新浪.华为.115.360等... 强大的百度云,你会继续免费让大家使用吗? 今天在Linux上使用了liulang的BCloud百度云客户端,登陆之后不显示主页,什么 ...
- [C#] 将 List 转 DataTable
/// <summary> /// Convert a List{T} to a DataTable. /// </summary> private DataTable ToD ...
- Logistic Regression - Formula Deduction
Sigmoid Function \[ \sigma(z)=\frac{1}{1+e^{(-z)}} \] feature: axial symmetry: \[ \sigma(z)+ \sigma( ...
- 11月10日下午 ajax做显示信息以后用ajax、Bootstrp做弹窗显示信息详情
1.用ajax做弹窗显示信息详情 nation.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&qu ...
- 三列等高 css实现
实现这个三列等高 布局需要最外层的一个div wrap容器 里面有三个div容器 这个最外层div 需要移除隐藏 overflow:hidden; 关键点就是三列div 同时margin-botto ...
- Robots.txt - 禁止爬虫(转)
Robots.txt - 禁止爬虫 robots.txt用于禁止网络爬虫访问网站指定目录.robots.txt的格式采用面向行的语法:空行.注释行(以#打头).规则行.规则行的格式为:Field: v ...