类型枚举不是通用错误克隆和引擎
从 AndEngine 项目克隆存储库后,我不断收到此错误。
Enum 类型不是通用的;它不能用参数
进行参数化
这是错误仍然存在的类。
package org.andengine.util.spatial.adt.bounds; //The error points at the beginning of this line.
import org.andengine.util.exception.AndEngineException;
/**
* (c) Zynga 2011
*
* @author Nicolas Gramlich <[email protected]>
* @since 21:13:32 - 11.10.2011
*/
public enum BoundsSplit {
// ===========================================================
// Elements
// ===========================================================
TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT;
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
public static class BoundsSplitException extends AndEngineException {
// ===========================================================
// Constants
// ===========================================================
private static final long serialVersionUID = 7970869239897412727L;
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
编辑
:
这里有更多关于错误的内容
Multiple markers at this line
- The type java.lang.Enum cannot be resolved. It is indirectly referenced from
required .class files
- The type Enum is not generic; it cannot be parameterized with arguments
<BoundsSplit>
- The type java.lang.Object cannot be resolved. It is indirectly referenced from
required .class files
- The type java.lang.Enum cannot be resolved. It is indirectly referenced from
required .class files
I keep getting this error after cloning a repository from the AndEngine project..
The type Enum is not generic; it cannot be parameterized with arguments <BoundsSplit>
Here is the class where the error persists.
package org.andengine.util.spatial.adt.bounds; //The error points at the beginning of this line.
import org.andengine.util.exception.AndEngineException;
/**
* (c) Zynga 2011
*
* @author Nicolas Gramlich <[email protected]>
* @since 21:13:32 - 11.10.2011
*/
public enum BoundsSplit {
// ===========================================================
// Elements
// ===========================================================
TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT;
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
public static class BoundsSplitException extends AndEngineException {
// ===========================================================
// Constants
// ===========================================================
private static final long serialVersionUID = 7970869239897412727L;
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
}
EDIT:
Here is more on what the error says
Multiple markers at this line
- The type java.lang.Enum cannot be resolved. It is indirectly referenced from
required .class files
- The type Enum is not generic; it cannot be parameterized with arguments
<BoundsSplit>
- The type java.lang.Object cannot be resolved. It is indirectly referenced from
required .class files
- The type java.lang.Enum cannot be resolved. It is indirectly referenced from
required .class files
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,看来这个错误有很多原因。主要来自搜索网络(这里)是项目目录中的
.classpath
文件是错误的 - 这也是我的文件。很可能是AndEngine的项目文件有错误,因为你说更新的时候遇到了这个问题。因此,您可以:
另一个原因可能是 JRE 系统库配置错误。有一个关于如何解决这个问题的很好的教程这里< /a>.
顺便说一句,这个问题与 eclipse 有关,所以我会用 eclipse 标签重新标记你的问题,所以如果我的答案没有帮助 - 至少你会得到更好的答案:)
Well, it seems that this error has many causes. The main one from searching the web (Here) is that the
.classpath
file in the project directory is wrong - that's the one I had, too. It's probably AndEngine's project who has the wrong file, because you said this problem was encountered when you updated it.So, you can either:
Another reason might be because of mis-configured JRE system library. There is a nice tutorial of how to fix that here.
By the way, this problem is related to eclipse, so I'll retag your question with
eclipse
tag, so if my answer won't help - at least you will get better ones :)