17
votes

I am using android 2.2 and if I run my project these errors occur. I am new to programming android applications. Can anyone help me?

1) Description Resource Path Location Type: 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

Java Problem

2) Description Resource Path Location Type: Unable to resolve target 'android-5'

Android Target Problem

3) Description Resource Path Location Type: Unable to resolve target 'android-5' until the SDK is loaded.

Android Target Problem

4) Description Resource Path Location Type: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

VirtualKeypad.java /MojoGBAMulti/src/com/momojo/gba/input line 1

Java Problem

5
For future messages, try to use a more descriptive subject line. It will help you get responses. I've submitted an edit to this one.Ellen Spertus

5 Answers

14
votes

Click the SDK button. You will probably get a warning that says "Location of the Android SDK has not been setup in the preferences."

Go to Window->Preferences->Android Now find your SDK location (most likely: C:\Program Files (x86)\Android\android-sdk-windows). Click apply. If you see the window load up you're set!

12
votes

restart Eclipse and it will be fine :)

8
votes

Right click on project -> Properties -> Java Build Path (From Left List) -> Libraries (Tab) -> Add Library (Button on right) -> JRE System Library -> Next -> Workspace default JRE -> Finish

This should solve at least one of your errors. Any others might require you to add further libraries.

Hope this helps.

3
votes

I had the same problem sometime ago with some of my projects. My solution was:

Right click in the project -> Build Path -> Configure Build Path...

Then in the 'Libraries' tab, I removed the Library which was named as 'Unable to get system library for the project' And click OK.

After that:

  • Right click in the project -> Build Path -> Add Libraries...
  • select Android Classpath Container (if not selected yet) and click next
  • Select your project on the selectebox (it should be selected already), click Finish.

Just wait a bit while the project is rebuilt.

1
votes

Right click on your project go to project properties - > click on build path for android - and you should tick all the mentioned libraries check box.