Unable to execute dex: null

本文解决了Eclipse中出现的“Conversion to Dalvik format failed”错误,并提供了调整内存设置及正确导入外部项目的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目是从外部导入Eclipse中的,只要一编译,就会报错:Conversion to Dalvik format failed: Unable to execute dex: null
同时Eclipse也变的很卡,好几次都挂掉了,求高手帮忙指点一二,多谢

解决

1:设置内存

eclipse.exe的快捷方式 ——右键/属性 在 目标 里填写如下内容
"D:/eclipse/eclipse.exe" -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M

双引号内 为eclipse的安装路径。

如果1不行:

应该采用用户库的形式导入该库,具体步骤如下:

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

用到我自己的项目上去。编译OK。

 

如果还是有红色叉叉,则选择 java build path  --》 order and export 把自己导入的包放到android的包前面即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值