title: Amazon AppStore all of the sudden complains about 65k reference limit on an app that has been using multidex for years
body: <p>I have an app I've been trying to release on the Amazon App Store. My app has been using multidex for years. I've done several releases on the App Store but now all of the sudden it is complaining about the 65k limit even though my app already uses multidex. </p>
  
  <p>This is the message <code>During publishing process, the app exceeded 65k reference limit. Please enable multidexing your app or use ProGuard to reduce methods and resubmit the app.</code></p>
  
  <p>I unzipped my apk and I can see multiple dex files. So that means multidex is working right? </p>
  
  <p>So what could be the issue?</p>
  
  <p>Thanks. </p>
  
  <p>Edit: I submitted the app for live testing to see if I could get the error quicker and I did get it and I also got more info:</p>
  
  <p><code>The submitted APK has too many methods for our system to successfully process. Android is limited to 65,536 methods. After we inject methods for supporting our Appstore and DRM solution (we inject of the order of 1,627 methods plus 8 methods per activity in the manifest) your app contains more than 65,536 methods.</code></p>
  
  <p>Since I'm already using multidex, could it be that they are adding their methods to one of my dex files and it is hitting the limit? </p>
  
  <p>Edit: just used a dex counter and my classes.dex file has exactly 65536 so I'm guessing they have a bug on their code that they check <code>&gt;=</code> instead of <code>&gt;</code>. Just a guess. </p>