Google Play api引用未被识别

时间:2016-02-03 23:25:49

标签: android google-play-services google-play-games

我正在关注https://github.com/playgameservices/android-basic-samples

我无法让项目buttonclicker2000进行编译。

请参阅下面的屏幕截图。

Failed imports

1 个答案:

答案 0 :(得分:1)

灰色的所有导入语句都必须添加到项目库中。

在您提供的链接https://github.com/playgameservices/android-basic-samples上,进入脚本文件夹,然后进入eclipse_aux文件夹。下载.jar文件并将其保存在您可以找到的地方。

现在在Android Studio中,在左侧项目树中,右键单击" ButtonClicker" >新>模块

然后选择Import .JAR / .AAR Package选项。

您可以点击"浏览" [...]在最右边,找到你的罐子。 同步项目:右键单击应用>同步应用

之后你应该是金色的。通过Alt-Shift over RED方法/代码与您添加的库相关,您现在应该能够快速导入。