How to add Google Play Services for Froyo to the project using Gradle?

前端 未结 1 565
灰色年华
灰色年华 2020-12-08 23:33

Information from Google Developers Portal:

  1. Open the build.gradle file inside your application directory.
  2. Add a new build rule under
1条回答
  •  感情败类
    2020-12-09 00:36

    If you download "Google Play services for Froyo" library using the Android SDK Manager (under the "Extras" category towards the bottom), you should be able to see the current version number in the AndroidManifest.xml bundled with the google_play_services_froyo library, in \extras\google\google_play_services_froyo\libproject\google-play-services_lib.

    On my computer, AndroidManifest.xml for Google Play Services for Froyo looks like this:

     
    

    You should then be able to use this version name (the first part) with Gradle:

    dependencies {
        compile 'com.android.support:appcompat-v7:+'
        compile 'com.google.android.gms:play-services:3.2.65'
    }
    

    Just make sure you also have the latest versions of "Google Repository" and "Android Support Repository" also installed via the Android SDK Manager (also under the "Extras" category).

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