I follow https://developers.google.com/games/services/android/init to setup leaderboards. So in my game project I have setup google_play_services lib as it already uses AdMob. Now I need to all Also BaseGameUtils. But the steps in section "Setting up your game project" in the link above don't work. Let me tell what I have done:
- Opened https://github.com/playgameservices/android-basic-samples and pressed "Download ZIP".
- Extracted the zip and imported the folder into my project. Disselected all and selected only
BasicSamples/libraries/BaseGameUtils/src/main
which was added in my project asmain
and not asBaseGameUtils
. - Right clicked on
main
project, inProperties->Android
section selectedIs Library
and in my game project inProperties->Android
section added Reference tomain
library. (Note that if you don't selectIs Library
you cannot do6. In the Library panel, click the Add button. 7.Select BaseGameUtils.
step as it is pointed out in the tutorial ) - In my package src directory create a new class like this:
import gms.common.api.*; import com.google.example.games.basegameutils.BaseGameActivity; public class MyGameActivity extends BaseGameActivity {
but neither of the imports is recognized. How to setup this? This should have been to be so easy but is it so creapy?