Information from Google Developers Portal:
- Open the build.gradle file inside your application directory.
- Add a new build rule under dependencies for the latest version of play-services. For example:
apply plugin: 'android'
...
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:4.0.30'
}
But this is instruction for standart Google Play Services. Google Play Services for Froyo is a different module. I've never worked with Gradle - what I need to do to add Google Play Services for Froyo?
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 <Android SDK Home>\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:
<?xml version="1.0" encoding="UTF-8"?> <manifest android:versionName="3.2.65 (834000-30)"
android:versionCode="3265130" package="com.google.android.gms"
xmlns:android="http://schemas.android.com/apk/res/android"><uses-sdk
android:minSdkVersion="8"/></manifest>
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With