Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

android - Can not run project after adding google play services to project

I am making a android application with needs google map.

I created a new project in eclipse and compiled it on an android phone, it worked, but when I import the google-play-services_lib to my workspace and added a reference to it in my project, it doesn't compile, hangs up for a while with the status bar showing (launching project 100%) and displays an error "Unable to execute dex: Java heap space"

Update: I also tried changing the eclipse.ini file to increase memory limit to 512 and 1024, but no use

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m

PS: searched alot before posting a question

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Conversion to Dalvik format failed: Unable to execute dex: Java heap space

The gist is: Keep increasing the Xms and Xmx values until it either works or you run out of physical memory.

in eclipse.ini

E.g.: -XX:MaxPermSize=1536m -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1536m


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...