Skip to content Skip to sidebar Skip to footer

Error In Eclipse (for Android): The Type Java.lang.String Cannot Be Resolved. It Is Indirectly Referenced From Required .class Files

I am trying to run an Android project that someone else has created. I have opened the project in Eclipse as: File --> New --> Project --> Android Project from existing co

Solution 1:

Do one more step before running:

Right Click(Project) -> Properties -> Java Build Path -> Libraries -> 
                                          Add Library -> Select the Java Library

Click OK and then clean-build (Project -> Clean & Project -> Build All or Ctrl+B) your project. It should be fine.


Solution 2:

This is an annoying Eclipse Bug which seems to bite now and then. See http://dev-answers.blogspot.de/2009/06/eclipse-build-errors-javalangobject.html for a possible solution, otherwise try the following;

Close the project and reopen it.

Clean the project (It will rebuild the buildpath hence reconfiguring with the JDK libraries)

OR

Delete and Re-import the project and if necessary do the above steps again.

Post a Comment for "Error In Eclipse (for Android): The Type Java.lang.String Cannot Be Resolved. It Is Indirectly Referenced From Required .class Files"