推荐安卓开发神器(里面有各种UI特效和android代码库实例)

在eclipse中编译android project,提示如标题的错误。

其原因有可能是eclipse heap overflow

解决办法:修改eclipse.ini中的Xms和Xmx

-startup   plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar   --launcher.library   plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810   -product   org.eclipse.epp.package.jee.product   --launcher.defaultAction   openFile   --launcher.XXMaxPermSize   256M   -showsplash   org.eclipse.platform   --launcher.XXMaxPermSize   256m   --launcher.defaultAction   openFile   -vmargs   -Dosgi.requiredJavaVersion=1.5   <SPAN style="COLOR: #ff0000">-Xms256m   -Xmx768m</SPAN>  -startupplugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810-productorg.eclipse.epp.package.jee.product--launcher.defaultActionopenFile--launcher.XXMaxPermSize256M-showsplashorg.eclipse.platform--launcher.XXMaxPermSize256m--launcher.defaultActionopenFile-vmargs-Dosgi.requiredJavaVersion=1.5-Xms128m-Xmx512m


注意值不能改太大,不然在launch eclipse的时候会出现“Failed to create Java Virtual Machine”



And here are some tips from websites abroad:

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 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 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.

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 :

Right-click the project in Eclipse and select “Build Path -> Add Libraries…”.
Select User Library from the list and click Next.
Click the “User Libraries…” button.
Click “New…” in the User Libraries dialog.
Give the user library a name and select the System library checkbox and click OK.
Highlight the newly added user library in the list and click the “Add JARs…” button and add the desired jar files.
Click OK on the User Libraries dialog.
Make sure the new user library is checked in the Add Library dialog and …

更多相关文章

  1. Android(安卓)NDK移植libiconv和libxml2
  2. Android(安卓)进程间通信 实例分析
  3. android启动模式android:launchMode
  4. android NDK 开发
  5. AIDL简单实例
  6. Android:Native C源码(NDK)如何使用sqlite3进行编程?
  7. Android(安卓)ROM研究---Android(安卓)build system增加模块
  8. Windows Cocos2d-x(二) Visual Studio 编写工程导入Android(安卓)S
  9. Android中framework层下添加aidl编译说程序包不存在

随机推荐

  1. mysql中替代null的IFNULL()与COALESCE()
  2. mysql5.7.18安装并修改初始密码的方法
  3. Centos7.3下mysql5.7.18安装并修改初始密
  4. MySQL 5.7 mysql command line client 使
  5. ubuntu mysql 5.6版本的删除/安装/编码配
  6. MySQL加密和解密实例详解
  7. mysql sql语句性能调优简单实例
  8. Python3.6-MySql中插入文件路径,丢失反斜
  9. windows下mysql 5.7版本中修改编码为utf-
  10. Workbench通过远程访问mysql数据库的方法