简体   繁体   English

java - Google Play游戏服务

[英]java - Google Play Game Services

Google Play Game Services is testing: Google Play游戏服务正在测试:

public class MainActivity extends BaseGameActivity {
    public void onCreate( Bundle savedInstanceState )
    {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          beginUserInitiatedSignIn();
    } 
}

When onSignInFailed() is called, the following pop-up message appears: 调用onSignInFailed() ,将显示以下弹出消息:

the application is incorrectly configured. 应用程序配置不正确。 Check that the package name and signing certificate match the client ID created in Developer Console. 检查包名称和签名证书是否与在Developer Console中创建的客户端ID匹配。 Also, if the application is not yet published, check that the account you are trying to sign in with is listed as a tester account. 此外,如果申请尚未发布,请检查您尝试登录的帐户是否列为测试人员帐户。 See logs for more information 有关更多信息,请参阅日志

I have sovled the problem like this :) 我已经解决了这样的问题:)

  1. Go to Google Developper Console https://cloud.google.com/console 转到Google Developper Console https://cloud.google.com/console
  2. Select Your game project, go to "APIs & Auth" > "Creditentials" 选择您的游戏项目,转到“API&Auth”>“Creditentials”
  3. Delete all the "Client ID for Android application" you have 删除您拥有的所有“Android应用程序的客户端ID”

At this point, we don't have anything more to do in the Google Developper Console. 此时,我们在Google Developper Console中没有其他任何操作。

  1. Go to Android Developper Console https://play.google.com/apps/publish 转到Android Developper控制台 https://play.google.com/apps/publish
  2. Select your game in Play service 在Play服务中选择您的游戏
  3. Go to "linked applications" 转到“链接的应用程序”
  4. Create a NEW linked application android and put it your production certificate SHA1 创建一个新的链接应用程序android并将其生成证书SHA1
  5. Create a NEW linked application android and put it your debug certificate SHA1 创建一个新的链接应用程序android并将其作为调试证书SHA1
  6. Wait a few to changes be deployed 等待一些更改部署

Now, we need to clear the Android Application cache before trying to connect 现在,我们需要在尝试连接之前清除Android应用程序缓存

  1. Clear cache of your application 清除应用程序的缓存
  2. Launch your app 启动您的应用

And... It's works !! 并且...它的作品! (For me at least...) My problem was that I've created the linked apps from the Google Developer Console instead of the Android Developper Console ... (对我来说至少......)我的问题是我从Google Developer Console而不是Android Developper控制台创建了链接的应用程序...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM