Ryan Tan
Ryan Tan

Reputation: 233

error when importing android projects into eclipse

currently i have difficulties trying to import the lynda.com android app development with java essential training exercise files into eclipse. I keep getting some java errors like this.Can someone help me out with this problem? Currently im using

here's the error:

The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path, then try building this project.

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

(original screenshot below) enter image description here

Upvotes: 2

Views: 8440

Answers (4)

ORY
ORY

Reputation: 413

This works

Project > Properties > Android > change the Build Target

Upvotes: 0

Patrick Jackson
Patrick Jackson

Reputation: 19416

Ryan,

I had the same problem and it was corrected by going to the project preferences(right click project -->preferences). Then go to "java build path" and click on the libraries tab. Look for your JRE lib in the list. In my case the system was unable to find it, but the entry was still there. Delete this and add a new one by clicking "add library" and select JRE System library. Then select the default system lib. Close out of the preferences window and then Right click on your project and go to android tools-->Fix project Properties. Clean your project and try building again.

Upvotes: 0

Twig2let
Twig2let

Reputation: 31

A little late on this, however after struggling with the issue myself I found a solution to the problem.

  1. Right Click on the project --> Build Path --> Configure Build Path...
  2. In the 'Source' tab, Select the project eg. 'myProject/src' --> Click OK.
  3. Right Click on the project --> Android Tools --> Fix Project Properties

That should do it!

Upvotes: 3

Henrique Rocha
Henrique Rocha

Reputation: 1737

Have you tried changing your compiler to Java 5 instead of Java 7? Also make sure that in the project settings that you're using Java 5.

Upvotes: 2

Related Questions