Jeff Sanders Technical Blog

I am a Microsoft employee that has worked on all aspects of the Web Stack for a long time. I hope these blogs are useful to you! Use this information at your own risk.


<< Go Back

Setting Up Eclipse For Windows Azure Mobile Services Development

- 18 Feb 2014

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

From the Android SDK download choose the big button on the right (link is this Download the SDK ADT Bundle for Windows):

image

Read the license agreement and if you don’t agree then STOP, otherwise grab the 64 bit SDK and download it:

image

Unzip the package (I put it in my documents in a folder I created called Android Development):

image

and read this:

http://developer.android.com/sdk/installing/bundle.html

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:

image </p>

Install the JDK

What is missing is now is the JDK.  Go here and install it:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Press the big Java button:

image

Accept the license agreement if you agree and download the Windows x64 version:

image

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:</p>

image

If everything is OK, and Eclipse starts go to the Android SDK Manager by choosing Window, Android SDK Manager.

image

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:

image

When that finishes, go back and select Google APIs and install that too:

image

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:

image

Select the Nexus S by Google and hit the Create AVD… button:

image

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).

image

Now you can proceed with the Data and Push tutorials for Android!

Footnotes

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:

image

Hit OK.

Conclusion

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!

<< Go Back