Wednesday, 23 November 2011

New App Engine Connected Android Project Won't Build

It's really irritating when watching a really cool video showing how easy it is to create a new project and right out of the box (so to speak) it doesn't compile :(

This happened to me whilst checking out the cool new App Engine Connected Android Project tutorial from Google IO 2011.

You have to download the Google plug-in for eclipse first of course, but then select New > Other > App Engine Connected Android Project.

It doesn't build - lots of errors - specifically can't find:

com.example.yourname.client.MyRequestFactory;
import com.example.yourname.client.MyRequestFactory.RegistrationInfoRequest;
import com.example.yourname.shared.RegistrationInfoProxy;

All we need to do is to build the two projects properly:
  1. Right-click on yourname-Android >Build Path > Configure Build Path... and go to the Projects Tab.
  2. Add the yourname-AppEngine project to the Android project by pressing the Add button and choosing it.
  3. Right-click on yourname-Android > Debug As >Local App Engine Connected Android Application.
No more red :)

If you do get errors then first try Clean and then Build. Other than that it's the standard turn it off and then on again, sometimes delete project (not files!!!!!) from workspace and re-import them (hence do NOT delete contents of project on disk!!!) otherwise Google it - maybe there's a problem release?

No comments:

Post a Comment