简体   繁体   English

RoboVM插件0.0.11不适用于Eclipse

[英]RoboVM plugin 0.0.11 not working with eclipse

When I create a RoboVM Eclipse project, Eclipse gives me an exception: 当我创建一个RoboVM Eclipse项目时,Eclipse给了我一个例外:

The selected wizard could not be started.
Plug-in org.robovm.eclipse.ui was unable to load class org.robovm.eclipse.internal.NewCocoaTouchProjectWizard.
An error occurred while automatically activating bundle org.robovm.eclipse.ui 

Likewise, I get this message when I try to go to "Settings" > "RoboVM": 同样,当我尝试转到“设置”>“ RoboVM”时,也会收到此消息:

Unable to create the selected preference page.
An error occurred while automatically activating bundle org.robovm.eclipse.ui.

I have updated to Java 1.7. 我已经更新到Java 1.7。 I am using Eclipse version 3.7.2 but I faced the same issue when I tried it with Kepler Service Release 2. 我正在使用Eclipse 3.7.2版,但是在Kepler Service Release 2中尝试时遇到了相同的问题。

This issue is similar to robovm plugin wont work but the responses there didin't solve my issue, as I am already using the latest roboVM and JDK. 这个问题类似于robovm插件无法正常工作,但是那里的响应并不能解决我的问题,因为我已经在使用最新的roboVM和JDK。

What OS are you running Eclipse on? 您在什么操作系统上运行Eclipse? Guessing OSX Mavericks? 猜OSX小牛?

I think I had something similar and this resolved it: https://stackoverflow.com/a/21148562/19506 . 我也有类似的东西,这解决了它: https : //stackoverflow.com/a/21148562/19506 The problem I had was that I had installed Java 7 (as it sounds like you have) and it showed up in Eclipse as available. 我遇到的问题是我已经安装了Java 7(听起来像您已经安装了Java 7),并且可以在Eclipse中看到它。 BUT, Eclipse itself wasn't running Java 7, it was using Java 6. And the plugin will only run in Java 7. I'm using Kepler SR2 fwiw. 但是,Eclipse本身并没有运行Java 7,而是使用Java6。该插件只能在Java 7中运行。我正在使用Kepler SR2 fwiw。

Ie You first install Java 7 (sounds like you did that), but then you have to make sure Eclipse runs with it - not just has it available in the build environment. 即,您首先安装Java 7(听起来像那样),但随后必须确保Eclipse随Java 7运行-不仅仅是在构建环境中可用。

One trick was finding eclipse.ini by doing a right-click on /Applications/eclipse/Eclipse (or whatever you called it) and choosing Show Package Contents . 一种技巧是通过右键单击/Applications/eclipse/Eclipse (或您所谓的名称)并选择Show Package Contents找到eclipse.ini Then I added these two lines to the eclipse.ini file: 然后,将这两行添加到eclipse.ini文件中:

-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java

immediately before this line: 在此行之前:

-vmargs

Then I closed and restarted Eclipse. 然后,我关闭并重新启动Eclipse。 At this point, the plug-in was able to run. 此时,该插件已能够运行。

Hope this helps... It was a few weeks ago and I remember doing this was the biggest stumbling block I had with getting RoboVM running. 希望能对您有所帮助...几周前,我记得这样做是使RoboVM运行的最大绊脚石。 I just don't remember exactly what the error was! 我只是不记得确切的错误是什么!

This happens when you have lower version of Java as RoboVM expects you to use jdk1.7.x. 当您的Java版本较低时,就会发生这种情况,因为RoboVM希望您使用jdk1.7.x。 I had this problem in Mac as Mac used to release its own version. 我在Mac中遇到了这个问题,因为Mac曾经发布过自己的版本。 So I downloaded Oracle Java 1.7 and then opened eclipse. 因此,我下载了Oracle Java 1.7,然后打开了eclipse。 Under eclipse Preferences -> Java - Installed JREs, I added the newly installed jdk and made it default, finally removed the Java 1.6 from Installed JREs. 在eclipse Preferences-> Java-Installed JREs下,我添加了新安装的jdk并将其设置为默认,最后从Installed JRE中删除了Java 1.6。 Then uninstalled RoboVM. 然后卸载RoboVM。 Restarted Eclipse. 重新启动Eclipse。 Re-installed RoboVM. 重新安装RoboVM。 That's it. 而已。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM