title: Stripe for Android ExceptionInInitializerError
body: <p>Using the Stripe library and sample <a href="https://github.com/stripe/stripe-android" rel="nofollow">located here</a>. When I attempt to create a token in the release version of our app I get the following stacktrace:</p>
  
  <pre><code>    java.lang.RuntimeException: An error occured while executing doInBackground()
      at com.stripe.android.compat.AsyncTask$3.done(AsyncTask.java:250)
      at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
      at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
      at java.util.concurrent.FutureTask.run(FutureTask.java:242)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
      at java.lang.Thread.run(Thread.java:818)
  Caused by: java.lang.ExceptionInInitializerError
      at com.stripe.net.APIResource.&lt;clinit&gt;(APIResource.java:37)
      at com.stripe.android.Stripe$1$1.doInBackground(Stripe.java:28)
      at com.stripe.android.Stripe$1$1.doInBackground(Stripe.java:23)
      at com.stripe.android.compat.AsyncTask$2.call(AsyncTask.java:236)
      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
      ... 3 more
  Caused by: java.lang.RuntimeException: Missing type parameter.
      at com.google.a.c.a.getSuperclassTypeParameter(TypeToken.java:84)
      at com.google.a.c.a.&lt;init&gt;(TypeToken.java:62)
      at com.stripe.model.FeeRefundCollectionDeserializer$1.&lt;init&gt;(FeeRefundCollectionDeserializer.java:17)
      at com.stripe.model.FeeRefundCollectionDeserializer.&lt;clinit&gt;(FeeRefundCollectionDeserializer.java:17)
      ... 8 more
  </code></pre>
  
  <p>Seems to work fine using a debug build. I am using proguard and have added the exclusion noted in the docs:</p>
  
  <pre><code>-keep class com.stripe.** { *; }
  </code></pre>
  
  <p>The card I'm using is a test one which gracefully tells me it's a test card being used with a live key when I run a debug apk. When I attempt the same in a live apk it produces this crash.</p>
  
  <p>Testing without any proguard at all now...</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Okay I have turned off proguard completely and it seems to have made the issue go away. So now I'll try and dig around with my extremely limited proguard knowledge to try and figure out what's going on here :)</p>
  
  <p>Here is my full proguard-rules.pro file:</p>
  
  <pre><code>-dontwarn com.facebook.**
  -dontwarn org.joda.time.**
  -dontwarn org.codehaus.**
  -dontwarn java.nio.**
  -dontnote **ILicensingService
  -keep class com.crashlytics.** { *; }
  -keep class com.crashlytics.android.**
  -keep class com.stripe.** { *; }
  -keepattributes SourceFile,LineNumberTable,*Annotation*
  </code></pre>