异常提示:

[2014-01-16 09:27:35 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2014-01-16 09:27:35 - tab_demo] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

 
 

错误原因:

出现这个错误是因为项目中了引用了两个相同的jar包。
 

解决办法:

我们只需要将相同jar文件中重复的一个去除即可,详细步骤是:右键项目——Build Path——Configure Build Path...——Libriaries,然后我们在Libraries中将出现的相同jar文件去除一个,点击ok即可修复项目异常,通常我都是直接将Android Private Libraries删掉就行了,但是这样做只是临时性的修复,每当我重启eclipse的时候,eclipse就会自动再载入一次相同的jar文件,重新触发异常,所以大家也可以试试楼下评论的方法:卸载掉19版本的build tools,安装18.1.1及以下版本的build tools。
 
 
 
        右键选择项目,选择Build Path——Configure Build Path...,然后在弹出框中选择:Java Build Path——Libraries,最后将Android Dependencies和Android Private Libraries移除(remove)掉即可。 我遇到这种问题的时候,Android Dependencies和Android Private Libraries里面都没有我项目所需的库,所以我remove掉之后不需要重新添加jar包,但是如果你的Android Dependencies和Android Private Libraries里面有项目所需的库的话,需要你重新引入,否则项目会报错,jar引入:右键选择lib中的jar文件选择Add Build Path即可。

Unable to execute dex: java.nio.BufferOverflowException.解决办法的更多相关文章

  1. android升级后错误:Unable to execute dex: java.nio.BufferOverflowException.Check

    Android SDK Tools升级为22.3,Android SDK Platform-tools 升级为19后,编译工程出现错误: Unable to execute dex: java.nio ...

  2. Eclipse下Android开发错误之Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace

    升级了Android版本后,在运行应用时提示: [2013-11-27 10:37:35 - Dex Loader] Unable to execute dex: java.nio.BufferOve ...

  3. Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

    问题提示:Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. ...

  4. [2014-03-13 08:46:42 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

    Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. 问题提示 ...

  5. Error处理:Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack tra

    [2014-04-20 20:59:23 - MyDetectActivity] Dx  trouble writing output: already prepared [2014-04-20 20 ...

  6. 安卓常见错误Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

    Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. 导入新的 ...

  7. Android 报错:Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

    在android高版本开发环境(sdk 4.4)导入低版本(sdk 3.0)的工程时编译报错,报错信息如:Conversion to Dalvik format failed: Unable to e ...

  8. 安卓编译报错:Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

    今天在编译别人的project时遇到了这个错误,心想应该不是代码的问题.网上搜了一下,应该是sdk版本设置的问题,要设置为最新sdk版本才可以. 解决办法就是修改project.properties里 ...

  9. Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.(转)

    1.程序运行后异常显示: 解决方案:在项目上点击右键->properties->Java Build Path, remove掉Android Dependences即可

随机推荐

  1. opencv5-objdetect之级联分类器

    这是<opencv2.4.9tutorial.pdf>的objdetect module的唯一一个例子. 在opencv中进行人脸或者人眼 或者身体的检测 首先就是训练好级联分类器,然后就 ...

  2. jquery的getjson与jsonp

    仔细的学习jquery的getjson的用法. http://www.cnblogs.com/leejersey/p/3750232.html http://www.jb51.net/article/ ...

  3. SDN组网相关解决方案

    http://www.muzixing.com/pages/2016/02/14/sdnzu-wang-xiang-guan-jie-jue-fang-an.html 2016-02-14 by mu ...

  4. C# 对sharepoint 列表的一些基本操作,包括添加/删除/查询/上传文件给sharepoint list添加数据

    转载:http://www.cnblogs.com/kivenhou/archive/2013/02/22/2921954.html 操作List前请设置SPWeb的allowUnsafeUpdate ...

  5. datePiker弹出框被其他div遮挡

    最近在做项目的时候,datePiker弹出框被下面的div给遮挡住了,以前也碰到过这样类似的问题,之前直接在style中添加"z-index:1000".但是现在使用angular ...

  6. freemarker 分页取值

    <#if pagination??&&pagination.list??> <#list pagination.list as video> <td al ...

  7. nginx 的动静分离配置(tomcat)

    nginx+tomcat是想动静分离配置 首先在nginx的配置文件中添加tomcat的的集群配置 upstream tomcats { ip_hash; server 192.168.0.251:8 ...

  8. Kernel Methods (6) The Representer Theorem

    The Representer Theorem, 表示定理. 给定: 非空样本空间: \(\chi\) \(m\)个样本:\(\{(x_1, y_1), \dots, (x_m, y_m)\}, x_ ...

  9. mysql查看数据库

    进入MySQL Command line client下查看当前使用的数据库: mysql>select database(); mysql>status; mysql>show t ...

  10. Jquery-pagination.js分页处理

    首先提供pagination.js的插件源码 /** * This jQuery plugin displays pagination links inside the selected elemen ...