简体   繁体   English

LibGDX UI设置桌面项目错误

[英]LibGDX UI Setup Desktop Project error

i'm using eclipse kepler 4.3, I've installed the android sdk plugin, and installed everything required with the sdk manager, and I've also installed the Google Web Toolkit plugin as required. 我正在使用eclipse kepler 4.3,我已经安装了android sdk插件,并安装了sdk管理器所需的一切,我还根据需要安装了Google Web Toolkit插件。 I'm on ubuntu (linux) using openjdk-6. 我在使用openjdk-6的ubuntu(linux)上。 I've created my projects with the libgdx ui project creator thing, and I used nightly build with both of the third party programs. 我用libgdx ui项目创建者的东西创建了我的项目,并且我使用了两个第三方程序的每晚构建。 I imported them into eclipse fixed the android and html 5 errors, but I still have one error on my desktop project. 我将它们导入eclipse修复了android和html 5错误,但我的桌面项目仍然有一个错误。 The constructor LwjglApplication(Main, LwjglApplicationConfiguration) is undefined on line 14 of this class : http://pastie.org/8398405 I've tried googling, and stack overflow, but the only thing I found was the same error with the solution : "I installed GWT and it fixed the previous 2 errors", however i've already installed gwt, unless i'm being a derp and there are further setup instructions passed going to the install software thing, typing in the link installing it, and restarting. 构造函数LwjglApplication(Main,LwjglApplicationConfiguration)在这个类的第14行是未定义的: http ://pastie.org/8398405我已经尝试了谷歌搜索,并且堆栈溢出,但我发现的唯一一件事是与解决方案相同的错误: “我安装了GWT并且它修复了之前的2个错误”,但是我已经安装了gwt,除非我是derp并且还有进一步的设置说明转到安装软件的东西,输入安装它的链接,并且重新启动。 I would really appreciate any help, thanks guys :) 我真的很感激任何帮助,谢谢你们:)

Your core class (the main class in your core project) is called Main,just like the one in the Desktop project. 您的核心类(核心项目中的主类)称为Main,就像Desktop项目中的类一样。 So, like that, the desktop one is sending an instance of itself: 所以,像这样,桌面版本正在发送自己的实例:

this: 这个:

new LwjglApplication(new yourpackage.Main(), cfg);

or changing the name of that class will solve your problem. 或更改该类的名称将解决您的问题。

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

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