Referencing the google-play-services library

2019-04-04 04:01发布

I'm working on a project using the Google Maps Android API v2, and I have a problem when I start referencing google-play-services_lib. A red exclamation mark appears on my project icon, and I have an error message in the "Problems" tab (I'm using Eclipse) :

The container 'Android Dependencies' references non existing library 'C:\Users\Labo FMS\Documents\Applications\04-adt-bundle-windows-x86_64\sdk\extras\google\google_play_services\libproject\google-play-services_lib\bin\google-play-services_lib.jar'

And, indeed, if I go to that folder, I see that there is no "google-play-services_lib.jar" file.

I've tried reinstalling the library, and I've noticed that when it's installing there's an error message at the bottom :

[2013-04-09 13:54:32 - google-play-services_lib] Unable to resolve target 'android-8'
[2013-04-09 13:54:32 - google-play-services_lib] Unable to resolve target 'android-8'
[2013-04-09 13:56:18 - MainActivity] Unable to resolve target 'android-8'

Anybody knows what it all means ?

8条回答
家丑人穷心不美
2楼-- · 2019-04-04 04:43

This happened to me when updating the Android SDK components via the Android SDK Manager. Previously, I had imported a couple of Google libraries (Google Play Services, etc) into my Eclipse workspace and selected the Copy projects into workspace option. The upgrade broke this since the imported libraries' versions were a different version from the main SDK.

Deleting the copied projects from Eclipse, then re-importing them directly from the SDK directory fixed this issue in my case.

查看更多
ら.Afraid
3楼-- · 2019-04-04 04:49

What solved it for me was updating some packages ('sdk platform-tools', and 'sdk build-tools' were updated from 16 to 17) in the SDK manager. After that, everything was ok.

I spent nearly half a day to resolve this... I realize this will probably not help anyone, but for the remote 0.1% chance that this DOES help someone I decided to write up my answer here.

Hope this helps someone :-)

查看更多
登录 后发表回答