Referencing the google-play-services library

后端 未结 8 2308
余生分开走
余生分开走 2021-02-19 10:48

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 proj

相关标签:
8条回答
  • 2021-02-19 11:11

    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.

    0 讨论(0)
  • 2021-02-19 11:11

    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.

    0 讨论(0)
  • 2021-02-19 11:14

    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.

    0 讨论(0)
  • 2021-02-19 11:15

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

    0 讨论(0)
  • 2021-02-19 11:25

    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.

    0 讨论(0)
  • 2021-02-19 11:28

    in your manifiest file add this inside

     <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    
    0 讨论(0)
提交回复
热议问题