问题描述
我正在尝试使用Google Play游戏服务在排行榜中存储和显示用户的游戏得分.我正在关注-> https://developers.google.com/games/services/android/init .当我在项目中导入BaseGameUtils库时出现问题,然后所有andEngine类都显示错误(例如,无法解析Camera,并且我的导入也显示错误).另外,还有两个BaseGameActivity.java类(一个在andEngine jar中,一个在BaseGameUtils库中).如何解决此问题,请帮忙.
I'm trying to store and display the user's game score in a leaderboard using Google Play Game Services . I'm following this --> https://developers.google.com/games/services/android/init . The issue arises when I import the BaseGameUtils library in my project , then all the andEngine classes display an error (for eg. Camera cannot be resolved and my imports also display an error) . Also , there are two BaseGameActivity.java classes (one in the andEngine jar and one in the BaseGameUtils library ) . How to resolve this issue , please help .
推荐答案
我通过以下方式解决了它:1.将BaseGameActivity的名称(从BaseGameUtils lib)更改为GoogleBaseGameActivity2.使其扩展了AndEngine BaseGameActivity3.在我的主要游戏活动中,我扩展了GoogleBaseGameActivty而不是Andengine one.
I resolved it in following way:1. Changed the name of BaseGameActivity (from BaseGameUtils lib) to GoogleBaseGameActivity2. Made it to extend AndEngine BaseGameActivity3. In my main game activty I extend GoogleBaseGameActivty instead of Andengine one.
面向对象的编程人员:)
Object oriented programming guys:)
这篇关于将Google Play游戏服务排行榜集成到AndEngine Game中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!