從Google Developers Portal信息:如何使用Gradle將Google Play Services for Froyo添加到項目中?
- 打開您的應用程序目錄內的build.gradle文件。
- 在依賴關係下爲最新版本的播放服務添加新的生成規則。例如:
apply plugin: 'android'
...
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:4.0.30'
}
但這指令非標準谷歌播放服務。 Google Play Services for Froyo是一個不同的模塊。我從來沒有與Gradle合作過 - 我需要做什麼才能爲Froyo添加Google Play服務?