Goi
Goi

Reputation: 121

Unable to run imported project

I have a few projects that were previously tested to be working in 1 PC.

I've since moved to another Windows XP PC, and I've setup the development tools on this XP system. I've downloaded and installed the following in order:
1. Eclipse Classic 3.6.1
2. JDK v6(jdk-6u23-windows-i586.exe)
3. Android SDK Tools rev8(installer_r08-windows.exe)
4. SDK Platform v2.3/2.2, Google APIs, Android API8, rev2, Google USB driver, rev4
5. ADT 8.0.1

I created a new empty project just to make sure things are working, and I seem to be able to get that new project to run on the emulator just fine. However, when I imported an existing project into the workspace, I get a bunch of errors, such as: "The import java.util cannot be resolved" "The import android cannot be resolved"

When I look at Project Properties->Java Build Path, it shows "Unable to get system library for the project" under "Libraries" and "Order and Export". What's wrong?

I've also tried copying and pasting the .java files and main.xml files from the imported project to the new project, and it runs correctly...but somehow the imported project doesn't.

Thanks.

Upvotes: 12

Views: 18077

Answers (3)

maatik5
maatik5

Reputation: 277

  1. Click on Run Configurations
  2. Click on icon at top left corner(New launch configuration)
  3. Choose Project
  4. Click run !

Upvotes: 0

apptracke
apptracke

Reputation: 31

I think your project does not have project target name or missing. And it's simple go to main menu : project->properties->android (from left panel) then mark a project target name as you need for your project. After this it should work if not then clean your project like this : project->clean..>select (clean projects selected below )-> mark your project then click ok. thanks

Upvotes: 3

MindWire
MindWire

Reputation: 4089

  1. Right click on project name, open properties.
  2. Select Java Build Path (from left menus)
  3. Under the "Libraries" tab, find the entry 'Unable to get system library for project', select it then click on the Remove button.
  4. Select Android (from left menus), tick on the version of android you want to target.
  5. Select Project menu (main top level menu), select Clean... Select OK.
  6. Right click on project name again, go down to Android Tools > Fix Project Properties.

That should do the trick and add Android X.X (version you selected) to your project, and the imported project should start working.

Enjoy.

Upvotes: 68

Related Questions