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 <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
// ===========================================================
}
}
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
Well, it seems that this error has many causes. The main one from searching the web (Here) is that the
.classpathfile 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
eclipsetag, so if my answer won’t help – at least you will get better ones 🙂