简体   繁体   English

Android Studio和Google Play游戏

[英]Android Studio and Google Play Games

So I have a sign in button and I assigned it an ID then referenced that ID in code.. now I have been following the Android Documentation and it's telling me to use BaseGameActivity but I don't understand how to get BaseGameUtils (library) to get into the project I am working on so I can use BaseGameActivity.. I am using this tutorial 因此,我有一个登录按钮,并为其分配了一个ID,然后在代码中引用了该ID。.现在,我一直在关注Android文档,并告诉我使用BaseGameActivity,但我不知道如何将BaseGameUtils(库)进入我正在研究的项目,以便可以使用BaseGameActivity ..我正在使用本教程

https://developers.google.com/games/services/android/quickstart https://developers.google.com/games/services/android/quickstart

Thanks! 谢谢!

Kevin 凯文

If you are using Android Studio this shouldn't be too hard. 如果您使用的是Android Studio,这应该不太困难。 First, download the android-basic-samples repository from Github where the BaseGameUtils module is contained. 首先,从Github下载android-basic-samples存储库,其中包含BaseGameUtils模块。 Open the BasicSample project in Android Studio by importing the project through gradle. 通过gradle导入项目,以在Android Studio中打开BasicSample项目。

Then in your other project, select Import Module from the Android Studio menu and import the BaseGameUtils module from the BasicSamples project you downloaded. 然后在另一个项目中,从Android Studio菜单中选择“ 导入模块” ,然后从您下载的BasicSamples项目中导入BaseGameUtils模块。 This should copy BaseGameUtils into your project and you should be good to go. 这应该将BaseGameUtils复制到您的项目中,您应该一切顺利。

Also please note that BaseGameActivity is no longer the recommended method for getting starting with Google Play Games Services. 还请注意, BaseGameActivity不再是开始使用Google Play游戏服务的推荐方法。 Although it should still work at the moment, it will no longer be updated. 虽然目前仍可以使用,但将不再更新。

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

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