zoukankan      html  css  js  c++  java
  • 【Android】Tips for Android developer: “Conversion to Dalvik format failed: Unable to execute dex: null”

    Androiddeveloper, 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 ofmemoryerror…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 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!
    -vm
    C:Program FilesJavajdk1.6.0_07injavaw.exe

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

    大致解释一下上面的:

    问题:

    eclipse在build project的时候Conversion to Dalvik format failed: Unable to execute dex: null

    解决:

    在eclipse目录下打开eclipse.ini,在第一行添加

    -vm
    D:Program FilesJavajdk1.6.0_12injavaw.exe

    之后修改

    -Xms64m
    -Xms128m

    -Xms128m
    -Xmx512m

    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 desiredjar files.
    7. Click OK on the User Libraries dialog.
    8. Make sure the new user library is checked in the Add Library dialog and …

  • 相关阅读:
    Centos 6.4 8250/16550 只生成了4个串口
    Warning: Data truncated for column 'AirPress' at row 1
    I.MX6 32G SD卡测试
    oracle创建数据库表空间
    oracle创建表空间
    SpringMvc文件下载
    怎么取消ie浏览器body与html的间隙
    Ztree手风琴效果(第三版)
    判断JS对象是否拥有某属性
    js代码判断浏览器种类IE、FF、Opera、Safari、chrome及版本
  • 原文地址:https://www.cnblogs.com/rayray/p/3380621.html
Copyright © 2011-2022 走看看