Tag: 谷歌播放服务

Google Play服务库更新并丢失符号@ integer / google_play_services_version

当我的项目升级到最新版本的Google Play服务( v4.0,2013年万圣节发布 )时,您现在应该在AndroidManifest.xml文件中添加一个新的标签。 <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 不幸的是,当我尝试这样做,然后我得到这个编译错误: android-apt-compiler: /blahblah/AndroidManifest.xml:409: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). 然后,我可以在google-play-services_lib/res/values/version.xml导航到该文件,并查看该符号的原始整数: <integer name="google_play_services_version">4030500</integer> 然后将其插回到我的AndroidManifest.xml : <meta-data android:name="com.google.android.gms.version" android:value="4030500" /> 这样做的工作绝对好,我可以编译和运行项目和应用程序就好了。 但这显然是一个不可取的解决scheme,具有明显的可升级性问题。 有任何想法吗?

如何在Android模拟器中下载Google Play服务?

我想在我的应用程序中使用Google Play服务API,但是当我打开模拟器来testing应用程序时,会向我发送一条消息,指出“必须下载Google Play服务”。 我知道这是因为我在方法onResume() MainActivity中编写了这个testing。 我想知道如何在我的模拟器中安装Google Play服务,因为我很快就需要testing我的地图。

google-services.json为不同的productFlavors

我正在按照Google Developers页面上的指南来实施新的Google Cloud Messaging 我已经成功运行并testing了它。 但我现在的问题是我有不同的applicationFind / packageName和不同的GCM项目ID的productFlavors。 google-services.json必须放在/app/google-services.json而不是flavors文件夹中。 有没有什么办法使google-services.jsonconfiguration与众多风格不同?

无法parsing:com.google.firebase:firebase-core:11.2.0

同步我的项目时,出现了多个“解决失败”问题。 他们都是火力和娱乐服务相关的。 我确信他们都是一样的(11.2.0)。 我也检查了两者的最新版本是11.2.0。 另外,类似问题的所有其他答案都涉及更新SDKpipe理器中的Google播放服务和存储库,但我已经是最新的。 任何想法,为什么我不能同步我的项目? 编辑 – 目前的工作解决scheme // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:3.0.0' classpath 'com.google.firebase:firebase-plugins:1.0.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files […]

在Android模拟器上运行Google Maps v2

我试图在我的Android应用程序中实现Google Maps v2,但不幸的是,我没有看到地图,而是收到了以下消息: 是否有可能在Android模拟器(平台4.2)上运行这些地图?

com.android.build.transform.api.TransformException

我正在尝试整合谷歌login,在我的应用程序,我添加这些库: compile 'com.google.android.gms:play-services-identity:8.1.0' compile 'com.google.android.gms:play-services-plus:8.1.0' 也join到项目构buildgradle中: classpath 'com.google.gms:google-services:1.4.0-beta3' 也添加插件到应用程序构buildgradle: apply plugin: 'com.google.gms.google-services' 然后添加所需的权限,但是当我尝试运行我的应用程序,收到此错误: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0\bin\java.exe'' finished with non-zero exit value 2

Google Play服务更新至版本13后,出现错误

我怎样才能解决这个错误? 导致:java.lang.illegalargumentexception 11-01 11:08:12.845:E / AndroidRuntime(28885):引起:java.lang.IllegalStateException:应用程序的AndroidManifest.xml中的元数据标签没有正确的值。 预计4030500,但发现0.您必须在元素中有以下声明: google-play-services_lib清单: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.gms" android:versionCode="4030530" android:versionName="4.0.30 (889083-30)" > <uses-sdk android:minSdkVersion="8"/> </manifest> public void loginGooglePlus() { aHelper.setup(this, GameHelper.CLIENT_APPSTATE | GameHelper.CLIENT_GAMES); mHelper = aHelper.getAppStateClient(); //crash is here mHelper.connect(); } 完整的错误日志: 11-01 11:38:13.507: E/AndroidRuntime(31297): FATAL EXCEPTION: main 11-01 11:38:13.507: E/AndroidRuntime(31297): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.application.android.aja/com.company.application.android.aja.BeetleBattleAndroidActivity}: java.lang.IllegalStateException: The […]

如何在Genymotion虚拟机中安装Google Play服务(不支持拖放)?

如何在不具有拖放支持的Genymotion模拟器中安装Google Play服务? 我不能像Stack Overflow中提到的那样安装它如何在Genymotion虚拟设备上安装Google框架(Play,Accounts等)? 由于缺乏对拖放安装的支持。 Genymotion支持一些模拟器的Google Apps,但不支持平板模拟器。

如何在Genymotion虚拟设备上安装Google框架(Play,Accounts等)?

我目前正在尝试Genymotion和男孩,它比ADT模拟器快得多。 但是我需要安装Google Play来下载一些应用程序。 我如何做到这一点?