title: Android - Creating JsonFactory causes app crash
body: <p>I ran into a bit of trouble creating an app for android, I want to use a JsonFactory but the app crashes the moment I create one.</p>
  
  <p>I imported:</p>
  
  <pre><code>import com.google.api.client.json.JsonFactory;
  import com.google.api.client.json.jackson2.JacksonFactory;
  </code></pre>
  
  <p>And then I used:</p>
  
  <pre><code>private static final JsonFactory factory = new JacksonFactory();
  </code></pre>
  
  <p>I also added the "google-http-client-jackson2-1.16.0-rc.jar" and the "google-http-client-1.16.0-rc.jar" libraries to the build path.</p>
  
  <p>So both the emulator and the physical device gives "Unfortunately, ##apname## has stopped"</p>
  
  <p>Logcat gives the following:</p>
  
  <pre><code>08-29 13:28:27.754: E/AndroidRuntime(990): FATAL EXCEPTION: main
  08-29 13:28:27.754: E/AndroidRuntime(990): java.lang.ExceptionInInitializerError
  08-29 13:28:27.754: E/AndroidRuntime(990):  at java.lang.Class.newInstanceImpl(Native Method)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at java.lang.Class.newInstance(Class.java:1319)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.os.Handler.dispatchMessage(Handler.java:99)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.os.Looper.loop(Looper.java:137)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at android.app.ActivityThread.main(ActivityThread.java:5039)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at java.lang.reflect.Method.invokeNative(Native Method)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at java.lang.reflect.Method.invoke(Method.java:511)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at dalvik.system.NativeStart.main(Native Method)
  08-29 13:28:27.754: E/AndroidRuntime(990): Caused by: java.lang.NoClassDefFoundError: com.fasterxml.jackson.core.JsonFactory
  08-29 13:28:27.754: E/AndroidRuntime(990):  at com.google.api.client.json.jackson2.JacksonFactory.&lt;init&gt;(JacksonFactory.java:45)
  08-29 13:28:27.754: E/AndroidRuntime(990):  at com.example.youtubesearch.MainActivity.&lt;clinit&gt;(MainActivity.java:42)
  08-29 13:28:27.754: E/AndroidRuntime(990):  ... 15 more
  08-29 13:28:27.764: W/ActivityManager(288):   Force finishing activity com.example.youtubesearch/.MainActivity
  </code></pre>
  
  <p>Help would be much appreciated!!
  Thanks in advance</p>