`

Conversion to Dalvik format failed: Unable to execute dex 解决之道

 
阅读更多

Conversion to Dalvik format failed: Unable to execute dex

可能是由于导入的jar包太大导致的。

在项目中有个200多K的jar包,就出现了这个问题。

解决办法。

 

As Android developer, I have met a strange problem when I want use a third party jar, it remained me that:  Dex Loader] Unable to execute dex: null  Conversion to Dalvik format failed: Unable to execute dex: null  out of memory error…An internal error occurred during: “Build Project”.  Java heap space    This is the DEX Error,I find the solutions by Google, one way is to modify the eclipse.ini, you can increase the memory allocated in

1、eclipse.ini to this: -Xms128m -Xmx512m 

or something higher, but this didn’t work for me. After modify the eclipse.ini, I cannot start the eclipse. By StackOverflow, I find a solution: 

 eclipse.ini file must have -vm on first line and path on second line. don’t try to put everything into one line! 

2、-vm  C:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe    

After add the -vm and the path in my eclipse.ini, I can start my Eclipse and the problem has been resolved.  

3、Another way to solve the ” Conversion to Dalvik format failed: Unable to execute dex: null”

problem is using the user library, the concrete steps are as follows:

 1. Right-click the project in Eclipse and select “Build Path -> Add Libraries…”.

 2. Select User Library from the list and click Next.

 3. Click the “User Libraries…” button. 

4. Click “New…” in the User Libraries dialog.

 5. Give the user library a name and select the System library checkbox and click OK.

 6. Highlight the newly added user library in the list and click the “Add JARs…” button and add the desired jar files.

 7. Click OK on the User Libraries dialog.  8. Make sure the new user library is checked in the Add Library dialog and …    Posted by CuteAndroid 。

我同时用第一种和第三中方案解决的问题,内存的问题。

分享到:
评论

相关推荐

    Android 错误解决

    ### Android错误解决:Conversion to Dalvik format failed: Unable to execute dex: Wrapper was not properly loaded first 在Android开发过程中,开发者可能会遇到多种类型的错误提示。其中,“Conversion to ...

    丢失Android系统库或者Conversion to Dalvik format failed with error 1错误的解决方法

    本文分析了丢失Android系统库或者Conversion to Dalvik format failed with error 1错误的解决方法。分享给大家供大家参考,具体如下: 在eclipse开发Android项目时出现的很多问题都可以使用Project———>clean来...

    AndroidStudio利用android-support-multidex解决64k的各种异常

    Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536 或者 UNEXPECTED TOP-LEVEL EXCEPTION:  java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: ...

    Android 掌上校园.zip

    如果报错:Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;请删掉PalmCampus工程下lib包里的android-support-v4.jar】

    Android项目源码蚌埠掌上校园学生项目.rar

    如果报错:Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;请删掉PalmCampus工程下lib包里的android-support-v4.jar

    Andriod开发中引入jar包的正确方式介绍

    本文将详细介绍在Android开发中引入jar包的正确方法,避免上述提到的"conversion to dalvik format failed with error 1"这类错误。 首先,我们来分析错误的原因。当使用Eclipse进行Android开发,并尝试通过"Add ...

    eclipse+gradle解决android 65k 方法问题

    [2015-06-12 12:26:57 - Iphone] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536 ``` 这表明应用中的方法数已经超过了 Dalvik 虚拟机能处理的最大值。 #### 三...

    Android开发中Eclipse报错及对应处理方法总结

    本文较为详细的总结了Android开发中Eclipse报错及对应处理方法。分享给大家供大家参考,具体如下:...附: 网上其他处理方法:《丢失Android系统库或者Conversion to Dalvik format failed with error 1错误的解决方法》

    fatal error LNK1123: failure during conversion to COFF完美解决链接

    对于 fatal error LNK1123: failure during conversion to COFF错误,网上很多都是说把什么“是”改成“否”,其实都是治标不治本。这里有个链接,让你清楚知道为啥出错,怎么解决。记得保留哦~

    Proguard5.1

    Android项目导出时报错:conversion to dalvik format failed with error 1,用下载的Proguard将lib和bin覆盖eclipse下的sdk\tools\proguard的lib和bin文件夹,然后重新导出就成功了

    解决安装vs2012后vs2010 LINK : fatal error LNK1123: failure during conversion to COFF

    解决安装vs2012后vs2010 LINK : fatal error LNK1123: failure during conversion to COFF Wrong version: 03/18/2010 01:16 PM 31,048 cvtres.exe Correct version: 02/21/2011 06:03 PM 31,056 cvtres.exe

    FormatConversion:视觉编程学院

    "FormatConversion:视觉编程学院"可能是一个专注于教授如何进行各种格式转换技术的教育平台,特别是使用C#编程语言来实现这些转换。C#是Microsoft开发的一种面向对象的编程语言,它在构建桌面应用、游戏开发、移动...

    Conversion.roman-to-decimalANDdecimal-to-roman:此程序将有效的罗马数字转换为十进制数字,反之亦然

    这个"Conversion.roman-to-decimalANDdecimal-to-roman"程序旨在提供一个解决方案,将有效的罗马数字转换为十进制数字,同时也能将十进制数字转换回罗马数字。以下是关于这个程序及其相关知识点的详细说明。 1. **...

    AlgoLab Raster to Vector Conversion SDK

    AlgoLab Raster to Vector Conversion SDK 以动态链接库(dll)实现AlgoLab Raster to Vector Conversion Toolkit将光栅图转换为矢量图的所有功能。它也提供Raster Vector ActiveX, VB Com工具格式的界面。 ...

    oracle错误代码大全

    #### ORA-00087: Unable to execute remote command - **解释**: 无法执行远程命令。 - **解决方案**: 检查远程服务器配置和网络连接。 #### ORA-00088: Unable to execute SQL statement - **解释**: 无法执行...

    CMGC: a CAD to Monte Carlo geometry conversion code.pdf

    计算机辅助设计(CAD)模型到蒙特卡洛几何转换是大规模、精细化蒙特卡洛建模最有效的方法之一。CMGC(CAD to Monte Carlo geometry converter)是一种基于边界表示法到构造性固体几何(BRep ? CSG)转换方法的新开发...

    Euler angles to Quaternion Conversion description

    Euler angles to Quaternion Conversion - Allowed rotations sequences: xyz, xzy, yxz, yzx, zxy, zyx Euler Angles To Quaternion Conversion for six basic sequence of rotations around X(Roll),Y(Pitch) and ...

    Conversion to Judaism.pdf

    Conversion to Judaism

    font-spider, Smart webfont compression and format conversion tool.zip

    为了解决这一问题,开源项目“font-spider”应运而生,它是一个智能的Web字体压缩和格式转换工具,旨在优化网页的字体加载速度,提升页面加载效率。 **一、font-spider的工作原理** font-spider通过分析HTML和CSS...

Global site tag (gtag.js) - Google Analytics