title: java.lang.NoClassDefFoundError on Mixpanel bindings
body: <p>I'm trying to integrate Mixpanel into my Xamarin.Android project.
  But when I'm calling <code>Com.Mixpanel.Android.Mpmetrics.MixpanelAPI.GetInstance()</code>, <code>java.lang.NoClassDefFoundError</code> exception is thrown with message <em>com/mixpanel/android/mpmetrics/MixpanelAPI</em>. </p>
  
  <p>I've just built MixpanelAPI.jar, then created "Android Java Bindings Library" project, added jar as InputJar (also tried EmbeddedJar), then built dll and imported it into my project.</p>
  
  <p><code>jar tf MixpanelAPI.jar</code> shows all classes, <code>javap</code> shows valid class interfaces.
  Assembly Browser also shows all classes. But when it comes to <code>class_ref</code> <code>get</code>, exception is thrown. </p>
  
  <p>I can't get what I am doing wrong.</p>
  
  <p>Stacktrace:</p>
  
  <blockquote>
  <pre><code>[MonoDroid] UNHANDLED EXCEPTION: Java.Lang.NoClassDefFoundError: Exception of type 'Java.Lang.NoClassDefFoundError' was thrown.
   [MonoDroid] at Android.Runtime.JNIEnv.FindClass (string) [0x00087] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:287
   [MonoDroid] at Android.Runtime.JNIEnv.FindClass (string,intptr&amp;) [0x00014] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:300
   [MonoDroid] at Com.Mixpanel.Android.Mpmetrics.MixpanelAPI.get_class_ref () [0x00000] in /path/to/mixpanel/bindings/project/Mixpanel/Mixpanel/obj/Release/generated/src/Com.Mixpanel.Android.Mpmetrics.MixpanelAPI.cs:1047
   [MonoDroid] at Com.Mixpanel.Android.Mpmetrics.MixpanelAPI.GetInstance (Android.Content.Context,string) [0x00014] in /path/to/mixpanel/bindings/project/Mixpanel/Mixpanel/obj/Release/generated/src/Com.Mixpanel.Android.Mpmetrics.MixpanelAPI.cs:1199
  </code></pre>
  </blockquote>
  
  <p><a href="http://rghost.net/49120296" rel="nofollow">Mixpanel bindings (65 KB)</a> and
  <a href="http://rghost.net/49120301" rel="nofollow">Test project for bindings (7 KB)</a></p>