Add Google Play Services to Android Studio using Gradle

后端 未结 8 1411
萌比男神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:46

    Go to the setting -> apps in your android testing phone and search for google play services and click on it, there you will find the version number installed on your device.

    For me it was 9.6.83
    

    then just add your version number to this command below :-

    compile 'com.google.android.gms:play-services:9.6.83'

    • Add this to you build.gradle(app)

    • Gradle sync

    Later you may get a gradle error saying that the particular repository needs to be installed, Go ahead and download it ! Voila your next gradle sync is successfull.

提交回复
热议问题