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:26

Tried the best answer above but it still didn't work. After trying all the others and continue searching in other places but for no good.

What eventually solved the issue was to RESTART ECLIPSE and clean (after executing what's written in the best answer above).

查看更多
\"骚年 ilove
3楼-- · 2019-04-04 04:26

Just do a Project --> Clean. It worked for me. Good luck !

查看更多
别忘想泡老子
4楼-- · 2019-04-04 04:27

in your manifiest file add this inside

 <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
查看更多
Animai°情兽
5楼-- · 2019-04-04 04:28

google-play-services_lib not found target 'android-8' because it was not installed in your Android SDK.

change your Android target 'android-8' to any other using.

Your Project--->Right Click-->Properites-->Android-->Select Google API 15(whatever you have)-->ok

Or

Add this in Android manifest file.

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

you can add target SDK any which you have but it must be Google API.

查看更多
男人必须洒脱
6楼-- · 2019-04-04 04:33

When importing the project I checked Copy project into workspace checkbox. That solved it for me, which is quite strange as a matter of fact, but we all know eclipse goes crazy all the time. Btw, I want a working Eclipse for this Christmas.

查看更多
乱世女痞
7楼-- · 2019-04-04 04:38

Your second message means that you don't have the necessary file for SDK android-8, what you need to do is to open the SDK Manager and download the SDK version you would like to have (For example):

enter image description here

After that you would have the needed jar file, So you can add it to your Google Map project.

查看更多
登录 后发表回答