谷歌玩游戏服务排行榜 - 无法在Eclipse中正确设置罐了 [英] Google Play Game Services leaderboard - Unable to set jars up correctly in Eclipse

查看:207
本文介绍了谷歌玩游戏服务排行榜 - 无法在Eclipse中正确设置罐了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立我的项目在Eclipse中实现新的 Android的播放服务。你可以在我的下面3的截图看到, BibleTriviaLite 是我的项目,然后 BaseGameUtils 谷歌 - 播放 - services_lib 是两个项目,我进口的,国产的库,然后发 BibleTriviaLite 引用它们。

I am trying to set up my project in Eclipse to implement the new Android Play Services. You can see in my below 3 screenshots that BibleTriviaLite is my project and then BaseGameUtils and google-play-services_lib are the two projects that I imported in, made libraries and then made BibleTriviaLite reference them.

现在我在每一个项目中的错误。基本上,每一个进口和内置类(TextView中,巴顿,捆绑,上下文等)均无法解析为一个类型。我猜,我有我的罐子搞砸了某个地方。我永远无法理解他们充分,所以我有一个很难试图把所有的罐子在正确的位置,并获得我的项目工作。

Right now I have errors in every project. Basically every single import and built in class (TextView, Button, Bundle, Context, etc) all cannot be resolved to a type. I am guessing that I have my jars messed up somewhere. I never understood them fully so I am having a hard time trying to put all the jars in the correct spot and get my project working.

在导入2的Andr​​oid库(BaseGameUtils和谷歌播放services_lib),BibleTriviaLite是全功能的,所以我知道code ++工程。

Before importing the 2 Android libraries (BaseGameUtils and google-play-services_lib), BibleTriviaLite was fully functional so I know the code works.

我的问题是如何成功地成功地整合这些2的Andr​​oid库到我的主要项目,所以我可以平静地整合排行榜。如果任何特定的code是必要的,以排除故障,让我知道,我可以提供。我已经提供了以下3截图显示,所有我的罐子是每3个项目。

My question is how to successfully integrate these 2 Android libraries successfully into my main project so I can get on with integrating the leaderboards. If any specific code is needed in order to troubleshoot, let me know and I can provide. I have provided 3 screenshots below to show where all my jars are in each of the 3 projects.

推荐答案

我遇到过类似的问题,我跟在导游<一href="https://github.com/playgameservices/android-samples/blob/master/README.md">https://github.com/playgameservices/android-samples/blob/master/README.md我认为是相当准确的。

I encountered similar problems and I followed the guide at https://github.com/playgameservices/android-samples/blob/master/README.md which I found to be reasonably accurate.

在添加或者BaseGameUtils或谷歌播放服务库到您的项目,我建议你应该先解决这些错误在其中。这是我做的:

Before adding either BaseGameUtils or the Google Play Services Lib to your project, I suggest that you should first resolve the errors in them. This is what I did:

1)我定义了谷歌播放服务库作为库项目(属性... ... Android的检查是库)

1) I defined the Google Play Services Lib as a library project (Properties ... Android ... check "Is Library")

2)我加了谷歌播放服务库作为一个参考项目BaseGameUtils

2) I added the Google Play Services Lib as a reference project to BaseGameUtils

3)我还添加了支持库,以BaseGameUtils的构建路径的库款的ActionBarSherlock版本(如果您不使用ABS,那么你就不会需要做到这一点)

3) I also added the ActionBarSherlock version of the support library to the libraries section of the Build Path of BaseGameUtils (if you do not use ABS then you will not need to do this)

4)我打扫BaseGameUtils这再从BaseGameUtils删除了错误。

4) I cleaned BaseGameUtils and this then removed the errors from BaseGameUtils.

5)我定义BaseGameUtils为库项目(属性... ... Android的检查是库)

5) I defined BaseGameUtils as a library project (Properties ... Android ... check "Is Library")

6)然后我说BaseGameUtils和谷歌播放服务库作为参考项目,我的项目

6) I then added BaseGameUtils and the Google Play Services Lib as reference projects to my project

这为我工作。根据具体情况,你可能会发现,现在发现,你还有其他的一些问题(如不同的版本在项目的支持下的lib的解决方案,这是良好的记录在SO)。

This worked for me. Depending on circumstances, You may find now find that you have some additional issues (e.g. different versions of the support lib in your project. The solutions to this are well-documented on SO).

祝您好运!

这篇关于谷歌玩游戏服务排行榜 - 无法在Eclipse中正确设置罐了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆