Add Google Play Services to Android Studio using Gradle

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

    enter image description here

    enter image description here

    Hit check on all tools, to be safe

    enter image description here

    Hit check on API you are working with

    enter image description here

    Hit check on all extras to be safe

    enter image description here

    Go to file -> project structure

    enter image description here

    enter image description here

    enter image description here

    Finally go to build at the top of the screen and hit rebuild project

    0 讨论(0)
  • 2020-12-24 03:55

    As @Matt said, it is correct, I am here covered also which I did not find in the answer.

    To add the Google Play Service library in your application project, follow below steps :-

    1) Open the build.gradle file of your application module directory. See screenshot

    Screenshot

    2) Add new in your dependecies, here you to update the version number whenever you update the Google Play Service.

    dependencies {
        ...
        compile 'com.google.android.gms:play-services:4.2.42'
        compile files('src/main/libs/gson-2.2.4.jar')
    
    }
    

    3) Now Lastly important save your file and click on Sync with Gradle Files Iconin the toolbar.

    0 讨论(0)
提交回复
热议问题