我一直從AndEngine項目克隆庫後,收到此錯誤..枚舉類型是不通用的錯誤克隆andengine
的類型枚舉不是通用的;它不能與參數進行參數<BoundsSplit>
這裏就是錯誤仍然存在的類。
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
當你聲明Java中的'enum'中的成員,在那個'enum'中聲明合適的構造函數是強制性的,無論你是否明確地聲明它是'private',都是*'always'''''。你在'enum'中提供了一個合適的構造函數嗎? – Lion 2012-01-01 19:02:58
我所做的只是從https://github.com/twalkerjr22/AndEngine克隆一個存儲庫,並且錯誤不斷出現。我從來沒有得到過它。 – 2012-01-01 19:06:04
查看我剛添加的新編輯 – 2012-01-01 19:25:46