question

R. Steventon avatar image
R. Steventon asked

Amazon complains my app is over 65k methods, but it is not

WTF ? Are you guys repackaging the app, then going over 65k methods and then blaming me ? How do I fix this when the problem is not mine ? -R
amazon appstore
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
You can resolve this problem by either: 1. Splitting up your dex file and implementing a custom ClassLoader in order to allow for all of the methods required to implement your game remain. Google has documentation on how to do that at: http://android-developers.blogspot.com/2011/07/custom-class-loading-in-dalvik.html With sample code available at: https://code.google.com/p/android-custom-class-loading-sample/ 2. Using ProGuard with -dontoptimize –dontobfuscate in the configuration which will remove unused methods from the dex file during build time. 3. Utilizing JarJar to trim the dependency trees if possible: https://code.google.com/p/jarjar/​​
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.