Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running Google app engine mobile back end client

I am following the tutorial Getting started with mobile backend.

However when I try run the downloaded client I get the following exception:

05-23 14:48:49.960: E/AndroidRuntime(15384): FATAL EXCEPTION: main
05-23 14:48:49.960: E/AndroidRuntime(15384): java.lang.NoClassDefFoundError: com.google.cloud.backend.android.GCMIntentService
05-23 14:48:49.960: E/AndroidRuntime(15384):    at com.google.cloud.backend.android.CloudBackendAsync.<init>(CloudBackendAsync.java:71)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at com.google.cloud.backend.android.CloudBackendMessaging.<init>(CloudBackendMessaging.java:47)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at com.google.cloud.backend.android.CloudBackendActivity.onCreate(CloudBackendActivity.java:75)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at com.google.cloud.backend.android.sample.guestbook.GuestbookActivity.onCreate(GuestbookActivity.java:60)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.Activity.performCreate(Activity.java:5206)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.os.Looper.loop(Looper.java:137)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at android.app.ActivityThread.main(ActivityThread.java:4898)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at java.lang.reflect.Method.invokeNative(Native Method)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at java.lang.reflect.Method.invoke(Method.java:511)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
05-23 14:48:49.960: E/AndroidRuntime(15384):    at dalvik.system.NativeStart.main(Native Method)

I have no idea why this is happening from the out of the box sample code from Google. Does anyone know how to fix this?

Thanks, Jason

like image 202
Jason Avatar asked May 23 '13 11:05

Jason


3 Answers

Project -> Properties -> Java Build Path -> Order & Export and ensure Android Private Libraries are checked for your project

This seemed to solve it. bloody eclipse

like image 82
Jason Avatar answered Oct 19 '22 07:10

Jason


The solution is to combine both answers (from Jason and user2453622).

You have to export Android private Libraries and have a device/AVD with Google APIs.

like image 6
Baldrick Avatar answered Oct 19 '22 06:10

Baldrick


I ran into this until I specifically picked an AVD that was based on the Google API. Google APIs (Google Inc.) as the Target Name.

like image 1
user2453622 Avatar answered Oct 19 '22 06:10

user2453622