Add Google Play Services to Android Studio using Gradle

后端 未结 8 1380
萌比男神i
萌比男神i 2020-12-24 03:23

Im working on simple map app, I added google-play-services.jar and its reference to gradle

dependencies {
    compile files(\'libs/android-support-v4.jar\',          


        
8条回答
  •  隐瞒了意图╮
    2020-12-24 03:30

    Add this line in the dependencies section of your build.gradle file:

    compile 'com.google.android.gms:play-services:3.2.+'
    

    You don't need to add a .jar to your libs folder.

    Edit

    As Varun pointed out, you also need to update the SDK to contain the most recent version of the play services.

    You can do this by opening up the Android SDK Manager (under the Window tab) from Eclipse+ADT, checking the box next to Google Play services in the Extras folder, and clicking install.

提交回复
热议问题