简体   繁体   English

GWT编译器上的编译错误

[英]GWT compiling error at constructor

I have little knowledge how GWT works, so can anybody help me here? 我对GWT的工作原理知之甚少,所以有人可以在这里帮助我吗? This is the full log when I use Eclipse to compile my Playn html project: 这是使用Eclipse编译Playn html项目时的完整日志:

http://pastebin.com/0EXNe57a http://pastebin.com/0EXNe57a

The same error appears when I try to run the html version with Maven in Eclipse or command line. 当我尝试在Eclipse或命令行中使用Maven运行html版本时,会出现相同的错误。 Any feedback is appreciated. 任何反馈表示赞赏。

GWT is compiling your Java-Code to JavaScript and emulating the Classes and Methods you are using from the JRE. GWT正在将Java代码编译为JavaScript,并从JRE仿真您正在使用的类和方法。 But GWT is not supporting all Classes and Methods of the JRE. 但是GWT并不支持JRE的所有类和方法。

You can find a List of Supported Classes and Methods on gwtproject.org . 您可以在gwtproject.org上找到支持的类和方法的列表

In your case java.util.Vector is supported but not the methods add(float, float) and set(float, float) . 在您的情况下,支持java.util.Vector ,但不支持add(float, float)set(float, float) So you should look for an alternative. 因此,您应该寻找替代方案。

Note: The use of java.util.Vector is not recommended - regardless of working with GWT or not. 注意: 不建议使用java.util.Vector不管是否使用GWT。

Update: Can't remeber that there ever was a method add(float, float) in java.util.Vector . 更新:无法记住java.util.Vector曾经有一个方法add(float, float) Do you use that class or do you have an own util.Vector -Implementation? 您使用该类还是拥有自己的util.Vector -Implementation? If so you should check if your gwt.xml-file is including the source-path. 如果是这样,您应该检查您的gwt.xml文件是否包括源路径。 Already explained here . 已经在这里解释了

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

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