There were no detailed instructions for this and I ran into some problems when following our tutorial for this so here are my super easy to follow instructions. I did this on Windows 8.1 64bit OS installed in a Hyper-V VM. These instructions are for the 64 bit environment (I did not try the 32 bit).
Install the Android SDK
Read the license agreement and if you don’t agree then STOP, otherwise grab the 64 bit SDK and download it:
Unzip the package (I put it in my documents in a folder I created called Android Development):
and read this:
For convenience pin a link to Eclipse.exe on your taskbar. It is in the Eclipse sub-folder wherever you installed the android SDK and you can navigate there using Windows Explorer, right click on it and pin it:
Install the JDK
What is missing is now is the JDK. Go here and install it:
Press the big Java button:
Accept the license agreement if you agree and download the Windows x64 version:
Once you have installed the JDK there is still more to go!
Workspace and additional components
Now we need some more components.
When you start Eclipse create a workspace in your Documents folder:
If everything is OK, and Eclipse starts go to the Android SDK Manager by choosing Window, Android SDK Manager.
When the Android SDK Manager comes up, Close Eclipse then return to the SDK Manager and add ‘Google Play Services’ by checking it (under Extras) and install that and any updates that were detected for you:
When that finishes, go back and select Google APIs and install that too:
You can close the Android SDK Manager now.
Configure the Emulator
In order to use Push notifications you need to configure an emulator that has the Google APIs. To do this open Eclipse and go to Window, Android Virtual Device Manager:
Select the Nexus S by Google and hit the Create AVD… button:
For Target ensure you select Google APIs as shown below (important note: if you don’t see that option available, then you did not follow the steps I have listed above. You must resolve this or you cannot test Push Notifications).
Now you can proceed with the Data and Push tutorials for Android!
If you get this error when running the Push Tutorial:
E/AndroidRuntime(1701): Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging
You need to ensure you reference the GooglePlay Library in your project
Right Click on your project and choose properties:
Then Android, Add the google-play-services_lib as shown:
There are a couple of nuances for setting up Google Play Services and the SDKs to get started, but this should help you tremendously! Drop me a note if you found this useful and be sure to follow me @jsandersrocks and my team @WSDevSol on twitter!