如何确定的谷歌Play业务的版本? [英] How can I determine the version of Google Play services?

查看:412
本文介绍了如何确定的谷歌Play业务的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从迁移到Eclipse的Andr​​oid的工作室。我有我导入到一个使用谷歌播放服务的Andr​​oid Studio中的一个项目,所以我下面,我发现这里的文档:<一href="http://developer.android.com/google/play-services/setup.html">http://developer.android.com/google/play-services/setup.html 该文件说,我需要修改我的 build.gradle 文件。他们给的例子:

 应用插件:com.android.application
...

依赖{
    编译com.android.support:appcompat-v7:21.0.3
    编译com.google.android.gms:播放服务:87年6月5日
}
 

另外,文件中提到,要确保你每次更新谷歌Play业务更新此版本号。,我以为是在上面的例子87年6月5日 。那么,如何确定版谷歌播放我和我的Andr​​oid SDK管理器安装服务。这里是一个屏幕截图我的Andr​​oid SDK的:

所以,我的Andr​​oid SDK经理告诉我,我已经安装的修订的那么我该怎么把我的 build.gradle 文件?

 编译com.google.android.gms:玩-服务:6.5.22
 

...也许...

 编译com.google.android.gms:玩-服务:22'
 

任何帮助AP preciated!

更新:谢谢你所有的答案

我能找到像这样的版本:

  Leila001 @ win8的~/Windows_Home/AppData/Local/Android/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values
$猫version.xml
&LT; XML版本=1.0编码=UTF-8&GT?;
&LT;资源&GT;
    &LT;整数NAME =google_play_services_version&GT; 6587000&LT; /整数GT;
&LT; /资源&GT;
 

解决方案

您必须通过检查,以确保没有任何更新正确的想法。

要检查的最简单方法就是,当你有最新的下载在Android SDK(局部)。

我使用的是Mac OSX:

 〜/ Android的SDK /演员/谷歌/ m2repository / COM /谷歌/安卓/ GMS /播放-服务/
 

如果你看一下,你有您-Android的SDK /演员/谷歌/ m2repository / COM /谷歌/安卓/ GMS /播放服务/ ,你会看到所有版本下载的,你有。

最近的一个是 87年6月5日。 (编译com.google.android.gms:玩-服务:87年6月5日

对于你来说,在Windows目录路径将是:

<$p$p><$c$c>C:\Users\Leila001\AppData\Local\Android\extras\google\m2repository\com\google\android\gms\play-services

I am migrating from Eclipse to Android Studio. I have a project that I imported into Android Studio that uses Google Play Services, so I am following the documentation I found here: http://developer.android.com/google/play-services/setup.html This documentation says that I need to edit my build.gradle file. They give the example:

apply plugin: 'com.android.application'
...

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

Also the documentation mentions, "Be sure you update this version number each time Google Play services is updated.", which I assume is 6.5.87 in the above example. So how do I determine the "version" Google Play Services I have installed with my Android SDK manager. Here is a screen shot of my android sdk:

So my Android SDK Manager tells me I have installed "Revision" so what do I put in my build.gradle file?

    compile 'com.google.android.gms:play-services:6.5.22'

... or maybe ...

    compile 'com.google.android.gms:play-services:22'

Any help appreciated!

UPDATE: Thank you for all your answers.

I was able to find the version like so:

Leila001@win8 ~/Windows_Home/AppData/Local/Android/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values
$ cat version.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="google_play_services_version">6587000</integer>
</resources>

解决方案

You have the right idea by checking to make sure you do not have any updates.

The easiest way to check is simply when you have the latest downloaded in the Android SDK(locally).

I am using Mac OSX:

~/android-sdk/extras/google/m2repository/com/google/android/gms/play-services/

If you look where you have YOUR-ANDROID-SDK/extras/google/m2repository/com/google/android/gms/play-services/, you will see all the versions downloaded that you have.

The latest one being 6.5.87. (compile 'com.google.android.gms:play-services:6.5.87')

For you, the directory path on Windows would be:

C:\Users\Leila001\AppData\Local\Android\extras\google\m2repository\com\google\android\gms\play-services

这篇关于如何确定的谷歌Play业务的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆