如何在Android Studio中编译旧版Google Play服务?

时间:2015-12-31 10:04:36

标签: android google-play-services

我在我的应用程序中尝试过谷歌播放服务的新版本(8.4.0)。这已成功运行。 但我想编译旧的谷歌播放服务。 当我在Android Studio中更改版本时,它无法同步成功。 如何编译正确的旧版Google Play服务。我想在6.0.5版本编译版本。 谢谢!

这是build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.example.tina.releasemap"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
  }

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:6.5.87'
}

1 个答案:

答案 0 :(得分:0)

您不能只选择play-services的随机版本,并希望它能够正常运行。您可以选择的唯一版本是您在IDE中通过Android SDK Manager安装的版本。

Android SDK Manager

要查看您拥有的版本,您需要检查SDK目录。更多信息here