Android: The type java.lang.Enum cannot be resolved
Solution 1
At best, your build path is messed up. Right-click over the project name, and choose Build Path > Configure Build Path from the context menu. This brings up the build path portion of the project properties window, on the "Order and Export" tab. If the Android JAR is not checked, check it, then close the properties window.
At worst, you are trying to build this project purely from the SDK, which is unlikely to work, because few of the AOSP apps are designed to be built outside of the full firmware build.
Solution 2
It's not an android issue, it's an eclipse issue.
Check:
Android Eve
Just starting in the world of Android development... New to Java and Eclipse as well.
Updated on June 25, 2022Comments
-
Android Eve almost 2 years
I downloaded Android's Browser project (from git) and imported it to Eclipse. I cannot build it however because of the following error:
The type java.lang.Enum cannot be resolved. It is indirectly referenced from required .class files
Now... this is a development environment that has been working very well for other projects:
- Windows 7 Ultimate 64-bit.
- JDK 64-bit (jdk-6u23-windows-x64.exe installed.)
- Eclipse Classic 3.6 64-bit (eclipse-SDK-3.6.1-win32-x86_64.zip)
- Android 2.3 SDK Starter Package
So I am not sure where the problem could lie.
How do I solve this?