我 1 天前尝试登录 Google Play 游戏,但从来没有登录过,除非我收到以下消息。
日志猫
I/salahtaha: com.google.android.gms.common.api.ApiException: 4: 4:
Run Code Online (Sandbox Code Playgroud)
显现
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.salah250.test.test">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
Java代码
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
private void signInSilently() {
GoogleSignInClient signInClient = GoogleSignIn.getClient(this,
GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN);
signInClient.silentSignIn().addOnCompleteListener(this,
new OnCompleteListener<GoogleSignInAccount>() {
@Override
public void onComplete(@NonNull Task<GoogleSignInAccount> task) {
if (task.isSuccessful()) {
GoogleSignInAccount …Run Code Online (Sandbox Code Playgroud) 如何使用Google Play游戏服务在线保存数据?或者更好,我可以在线保存数据吗?
谢谢
我已经测试过以时间格式而不是整数提交分数,但是当我打开排行榜时,我的分数显示为 0.03 格式,而当我在 gpgs 中创建排行榜时,它显示格式应为 00:00:00 任何想法为什么我看到这样的时间..
当我发送 75 秒时,假设采用这种格式 00:01:15 --> 我在 gpgs 排行榜中获得了 0.08。
注意:我正在使用电晕 SDK + lua
根据此页面,Google Play API配额为20万个请求。假设他的数量是每个应用程序的数量(而不是每个应用程序的用户的数量),那么对于任何可行的应用程序来说,这个数目是否不算少?
我正在实现一个具有实时多人游戏模式的应用程序,因此我打算使用它来使用Google Play游戏。假设两个玩家共享一个游戏中的进度10次,这意味着每个游戏20个API调用(我忽略了用于设置房间,邀请等的api调用)。因此,一天可以玩少于1万个游戏。如果每个玩家每天玩10场游戏,则仅支持1000个活跃用户。
我对配额的理解是否有误,还是真的禁止Google Play服务?是否有其他解决方案可以减少我的api调用。
另外,更多API调用的费用是多少?还有多人游戏的替代解决方案吗?
谢谢
我按照说明谷歌玩游戏插件团结的地方说Back in Unity, open the setup dialog Window > Google Play Games > Setup... > Android Setup。
我找不到Google Play Games任何地方。我可能会丢失一些确实很明显的东西,但找不到任何有关它的信息。
我正在使用Unity5.3.2f1 Personal。
如何访问这些设置?
我们根据官方谷歌开发文档为我们的 Android 游戏实现了 Google Play 成就,但似乎有些不对劲,因为我们注意到 Google Play 游戏应用程序中存在以下奇怪的行为:


当通过游戏互动获得成就时,成就会像预期一样在游戏中显示为解锁的弹出窗口,但它们仍然不会显示在 Google Play 游戏应用中。
我们了解到,它的出现可能需要一定的玩家门槛,但另一方面,我们看到下载量只有 100 次的游戏已经在 Google Play 游戏应用中拥有成就计数器和徽章。我们这边是否需要任何额外的配置或操作才能显示它?
我在Unity中开发的游戏中没有验证GPGS的问题.
屏幕截图: 在imgur.com上查看帖子
发生次数如下:
1.连接到游戏
2. GOOGLE PLAY GAMES窗口弹出并消失(图像上方)
3.出现加载圈然后消失
我在手机上运行了adb logcat,下面是该区域的片段,我认为是问题所在:
04-30 09:45:10.023 11290 11316 W Unity :
04-30 09:45:10.023 11290 11316 W Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
04-30 09:45:10.023 11290 11316 W Unity :
04-30 09:45:10.044 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.058 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.065 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, …Run Code Online (Sandbox Code Playgroud) 我的 Android 应用登录 Google Play 游戏服务似乎无声无息地失败:在登录活动中选择用户后,onActivityResult()收到的resultCode值为 10002。Android API 将这些消息存放在 logcat 中:
W/SignInActivity(16216): onSignInFailed()...
W/SignInActivity(16216): Sign in failed during 6
W/SignInActivity(16216): ==> Returning non-OK result: 10002
Run Code Online (Sandbox Code Playgroud)
而我放置的 Log.w() 命令onActivityResult()存放这些消息:
W/Main activity(16167): In activity result with code 10002
W/Main activity(16167): activity result requests sign in
W/Main activity(16167): unsolved resolution
Run Code Online (Sandbox Code Playgroud)
奇怪的是它曾经可以工作,当我尝试从Android Studio调试它时,每次登录都完美无缺,所以我什至无法调试应用程序!
我可以从哪里开始调试这个?
我正在尝试集成 Google play 服务,以便我可以在游戏中获得成就和排行榜。我尝试了以下代码 -
public Text myText;
void Awake()
{
PlayGamesPlatform.Activate();
}
public void SignIN()
{
Social.localUser.Authenticate((bool Success) =>
{
if (Success)
{
myText.text = "Yayy!!";
}
else
{
myText.text = "Not AGAIN!!";
}
});
}
public void SignOUT()
{
PlayGamesPlatform.Instance.SignOut();
if (Social.localUser.authenticated == false)
{
myText.text = "SIGNED OUT!!";
}
}
Run Code Online (Sandbox Code Playgroud)
其中 SignIN() 和 SignOUT() 在按钮“登录”和“退出”中调用,但我无法登录。我已将 Google Play 开发者控制台中的资源复制粘贴到 Unity 中(窗口 - Google Play 服务 - 设置 - Android)将我的 apk 与开发者控制台上的 GooglePlayServices 链接起来。但是没用,我无法登录,请帮忙。
我在 Unity 2018.2.15f1 上使用 google play games Unity3D api,应该注意的是,我的 google play games 项目尚未发布,但是我不想在我获得所有成就之前发布它。
排行榜发帖代码为:
public void PostScore(long score)
{
Social.ReportScore(score, GPGSIds.leaderboard_high_scores, (bool success) => {
// handle success or failure
if(success)
{
Debug.Log("Posted Score of " + score);
}
else
{
Debug.Log("Failed to post score");
}
});
}
Run Code Online (Sandbox Code Playgroud)
并且 logcat 始终显示这返回成功,如下所示:
11-16 02:45:05.041: I/Unity(5503): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
11-16 02:45:05.042: I/Unity(5503): Posted Score of 19
Run Code Online (Sandbox Code Playgroud)
然而,无论排行榜没有更新,它始终显示 8 分。我不明白为什么会出现这个,因为它只出现在我的设备上,即使我擦除排行榜它仍然存在。
排行榜尚未发布的事实是否存在问题?或者可能有其他东西在起作用。