16

i'm quite new in eclipse.

I download a coding a get the error as below:

  • the project was not build since its build path is incomplete. Cannot find the class 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
  • Unable to resolve target 'android-15'
  • Unable to resolve target 'android-15' until the SDK is loaded.

Any idea how to solved it?

user2301281
  • 757
  • 2
  • 12
  • 27

5 Answers5

15

One thing which solved it for me was closing, then re-opening the project (r-click on project name in Package Explorer, "Close Project" then r-click on project name in Package Explorer, "Open Project").

No amount of cleaning the project helped me, and I had the correct version of the API installed. Eclipse is just super buggy and often breaks my build paths.

Kyle Falconer
  • 8,302
  • 6
  • 48
  • 68
10

In Eclipse go to window --> Android SDK manager and in sdk manager check whether you have installed sdk for api level 15 or not. And also right click on your project go to properties there is Android tab on left hand side pannel. Click on it that will show you project build target. Make it to higher version.

nilkash
  • 7,408
  • 32
  • 99
  • 176
2

I did something wrong in SDK Manager (probably deleted something) and had similar problem. But none of the above helped.

Tried to run Android SDK Manager, but it didn't load, showing error "Windows Failed to execute Android.bat" (only later I discovered that whole "tools" folder was missiong in installed Android bundle). So Android SDK Manager didn't start (and I think I remember that proper SDK was there installed before).

I also tried to correct issue in project.properties, but no Android version was available at all. Other forums also didn't helped.

Fortunaltely I found solution. So what I did is found my initially downloaded zipped Android bundle "adt-bundle-windows-x86-20131030" and extracted "sdk/tools" folder. Then I copied "tools" folder to my already installed Eclipse path "C:... \adt-bundle-windows-x86-20131030\sdk\" (Eclipse was closed). Started Eclipse, checked Build Path in my project and it was it - everything was back to normal.

Hope this will help to somebody with similar (additional to initial post) problem.

Alex
  • 31
  • 2
1

Another trick that solved for me is to edit the file project.properties, changing the target sdk with another one installed and then revert the file. This cause eclipse to rebuild the project with out the annoying error, but I hope the eclipse team will fix this bug...

demarcom
  • 131
  • 1
  • 3
1

For me the thing that finally solved it was to uninstall the Android ADT (Help -> About Eclipse -> Installation Details. Uninstalled everything android related + Tracer for OpenGL ES. after that reinstalled the ADT (http://developer.android.com/sdk/installing/installing-adt.html)