【发布时间】:2012-01-01 18:33:08
【问题描述】:
从 AndEngine 项目克隆存储库后,我一直收到此错误..
枚举类型不是通用的;它不能用参数
参数化
这是错误仍然存在的类。
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 <ngramlich@zynga.com>
* @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
【问题讨论】:
-
当您在 Java 中的
enum内声明成员时,必须在enum内声明适当的构造函数,无论您是否显式声明alwaysprivateprivate与否。您是否在enum中提供了适当的构造函数? -
我所做的只是从github.com/twalkerjr22/AndEngine 克隆一个存储库,并且错误不断出现。我以前从来没有得到过。
-
查看我刚刚添加的新编辑
-
我曾经遇到过这个错误,但不确定我是如何解决的。我现在要深入了解一下。
-
拜托了,这让我的项目搁置了! =(
标签: java android eclipse andengine