为啥无法登录 Google Play 服务?
Posted
技术标签:
【中文标题】为啥无法登录 Google Play 服务?【英文标题】:Why does signing in the Google Play Services not work?为什么无法登录 Google Play 服务? 【发布时间】:2018-02-15 14:11:40 【问题描述】:我的游戏无法登录 Google Play 游戏服务,我不明白为什么。我尝试了很多不同的解决方案,没有一个对我有用,而且我使用的是 Google 指南,但我仍然无法登录(尽管我已经设置了我的测试人员帐户并更正了 APP_ID
)。
清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hypeofpipe.westernshooter"
android:versionCode="8"
android:versionName="0.4preAlpha">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="25" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/GdxTheme" >
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity
android:name="com.hypeofpipe.westernshooter.AndroidLauncher"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
【问题讨论】:
请显示错误信息(logcat 输出)。 @JonGoodwin pastebin.com/Zmh3R3wr 这应该可以解决您的问题***.com/questions/40997205/… @JonGoodwin 所以我在你的回答中做了一个步骤,并且......它奏效了!谢谢! 问题出在 Google API 和我在 jks 的不同证书中,我用它来签署应用程序 【参考方案1】:是的,Włodek Wolieniuk,我在你的 logcat 中看到了:
GetToken 失败,状态码为:UNREGISTERED_ON_API_CONSOLE
这让我找到了this 链接。
事实是,当您签署 APK,然后向 Google 请求 OAuth2 令牌,您必须通过开发控制台注册您的签名应用。
【讨论】:
以上是关于为啥无法登录 Google Play 服务?的主要内容,如果未能解决你的问题,请参考以下文章