unable to get system library for the project on ec

2020-05-14 03:14发布

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?

9条回答
Explosion°爆炸
2楼-- · 2020-05-14 03:46

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

查看更多
The star\"
3楼-- · 2020-05-14 03:46

Borrowing from @Erhannis answer :

"
Right click on your project
Go to properties
Click the Android section
"

When I view the build target everything looked fine :

enter image description here

So I checked another build target , hit apply, and then re checked my original build target (Android 4.4.2) and re-hit apply. My project then compiled.

查看更多
你好瞎i
4楼-- · 2020-05-14 03:47

Right Click on Project-> Select Android tools -> Select Fix Project Properties

This did the trick for me.

查看更多
登录 后发表回答