android - import - with developers google com games

自闭症网瘾萝莉.ら 提交于 2019-12-20 01:57:09

问题


I'm follow the guide here https://developers.google.com/games. I did all the insturction in step 1 ("Step 1: Download the sample app") but the project isn't compile.

after I imported the google-play-services-lib project and the BaseGameUtils project, their R.java file appear in gen directory.

In the lines:

import com.google.android.gms.games.Player;
import com.google.example.games.basegameutils.BaseGameActivity;

I get the errors :

The import com.google.android.gms.games cannot be resolved
The import com.google.example.games.basegameutils.BaseGameActivity cannot be resolved

What could be the problem.

This is how the project look now: Edit 1:

Edit 2:

Edit 3:


回答1:


You probably did not reference google_play_services in your BaseGameUtils library. Right click the BaseGameUtils. Select Properties > Android. Add the google-play-services-lib project. Click okay to save.



来源:https://stackoverflow.com/questions/19655133/android-import-with-developers-google-com-games

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!