Google calender API

  • Replies:2
  • OpenNot stickiedUnanswered

Mar 3, 2014 3:27:00 PM via Website

i'm trying to use the google calender v3 api and i have downloaded the google api java client and followed the instructions regarding using a the android calender sample code, but once i imported it to eclipse i found many errors so i took a look and found that there were no libraries at all !!!
so i downloaded the java client libraries and imported all the jar files into the sample project and also used the google play service as a library and fixed some issues and had no errors in the end then once i run my app it crashes gving me this error in the logcat

103-03 16:25:52.610: E/AndroidRuntime(28619): FATAL EXCEPTION: main
203-03 16:25:52.610: E/AndroidRuntime(28619): java.lang.NoClassDefFoundError: com.google.api.client.extensions.android.http.AndroidHttp
303-03 16:25:52.610: E/AndroidRuntime(28619): at main.java.com.google.api.services.samples.calendar.android.CalendarSampleActivity.<init>(CalendarSampleActivity.java:104)
403-03 16:25:52.610: E/AndroidRuntime(28619): at java.lang.Class.newInstanceImpl(Native Method)
503-03 16:25:52.610: E/AndroidRuntime(28619): at java.lang.Class.newInstance(Class.java:1409)
603-03 16:25:52.610: E/AndroidRuntime(28619): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
703-03 16:25:52.610: E/AndroidRuntime(28619): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1674)
803-03 16:25:52.610: E/AndroidRuntime(28619): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1786)
903-03 16:25:52.610: E/AndroidRuntime(28619): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
1003-03 16:25:52.610: E/AndroidRuntime(28619): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:961)
1103-03 16:25:52.610: E/AndroidRuntime(28619): at android.os.Handler.dispatchMessage(Handler.java:99)
1203-03 16:25:52.610: E/AndroidRuntime(28619): at android.os.Looper.loop(Looper.java:130)
1303-03 16:25:52.610: E/AndroidRuntime(28619): at android.app.ActivityThread.main(ActivityThread.java:3892)
1403-03 16:25:52.610: E/AndroidRuntime(28619): at java.lang.reflect.Method.invokeNative(Native Method)
1503-03 16:25:52.610: E/AndroidRuntime(28619): at java.lang.reflect.Method.invoke(Method.java:507)
1603-03 16:25:52.610: E/AndroidRuntime(28619): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
1703-03 16:25:52.610: E/AndroidRuntime(28619): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:642)
1803-03 16:25:52.610: E/AndroidRuntime(28619): at dalvik.system.NativeStart.main(Native Method)

some say it's a maven problem and other says it's related to ticking jar files in the class path but i have tried all this and i get the same error and my app never started.

any help would be appriciated

Mar 3, 2014 4:00:18 PM via Website

The Lib is not included in the android apk.
You have to add the jar file into the application

LG
Pascal

//It's not a bug, it's a feature. :)