如果将google-play-services.jar lib添加到Eclipse中的helloworld android项目中,Android编译会冻结

时间:2015-04-28 10:03:58

标签: java android eclipse google-play-services

我正在尝试找出我的Android应用程序的google-play-services.jar错误的核心。 之前的链接是herehere。我浪费了整整2天才解决问题但没有结果。甚至我试图在两台不同的机器上重新安装Eclipse,Android SDK并在两个不同的设备上进行测试。但没有结果。最后一个实验给了我难以置信的错误:如果我只是将google-play-lib.jar添加到我的项目中,Eclipse不会为默认的hello-world项目构建(不会创建apk文件)。没有更多的代码。 Google API已启用。我正在使用最后一个eclipse版本,SDK - 更多关于截图的lates更新(24.1.2,22.0.1等)。 enter image description here

截图解释了这个问题。几分钟后我发生了日食崩溃!为什么??? Imazing!美丽! enter image description here

错误文字:

refreshing external folders blocked the user operation is waiting for background work to complete org.eclipse.jdt.croe.external.folders/.link0

1 个答案:

答案 0 :(得分:3)

它会冻结,所以这样做你的eclipse配置文件。手动增加Xms和Xmx。你可以在Eclipse文件夹中找到这个文件,文件命名如下:eclipse.ini

所以Eclipse配置应该是这样的。

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m