问题
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