Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to get system library for the project on eclipse ide

enter image description hereI was working on an android tutorial and it wanted me to import the library from another project .The import worked and the project works correctly. But I noticed that doing that messed up several of my other projects (the ones that use Android 2.1) by apparently messing with the build path. Now instead of seeing "Google APIs [Android 2.1]" under the gen folder I see "Unable to get system library for project".

I verified the following:

I right-clicked the project and went to Properties I see that the correct Project Build Target is checked(Google APIs [Android 2.1]), but "Unable to get system library for project" is still shown above the assets folder and below gen and Android Dependencies. Cleaning all projects doesn't help.

How can I fix this problem? is there a way to fix this issue globally or do I have to do it one by one?

like image 668
Pandiyan Muthu Avatar asked Aug 27 '12 12:08

Pandiyan Muthu


People also ask

Why referenced libraries Eclipse not showing?

jar files still are visible in the root of the project, click on the little "down arrow" icon in the top-right corner of the Package Explorer view. In the context menu that appears, one of the items on the menu is "Show 'Referenced Libraries' Node." Click on that menu item. Thx, this helped solving the problem!

How do I show library in Eclipse?

After launching Eclipse IDE, right-click on a Java project and select 'Properties' option as shown below: Select 'Java Build Path' from 'Properties for Java Project' dialog as shown below. In 'Java Build Path'->'Libraries' tab, you will see the 'JRE System Library' displayed as shown below.

How do I download Eclipse library?

To get started, open the "Preferences" window in Eclipse. Navigate to "Java » Build Path » User Libraries" on the left-hand side and click the "New" button. Enter the library name and click the "OK" button (leave the "System library" checkbox alone).


1 Answers

I had the same problem. Try

  1. Right click on your project
  2. Go to properties
  3. Click the Android section
  4. Select a different target api (assuming one is already selected, as mine was - otherwise, select the one you want and jump to step 9)
  5. Click OK
  6. Do steps 1-3 again
  7. Select your original target api
  8. Click OK
  9. Clean and build your project

Worked for me, anyway.

Derived the solution from: "Unable to get system library for project" after I upgraded to Android SDK 2.3 and ADT 8.0

like image 169
Erhannis Avatar answered Sep 20 '22 21:09

Erhannis