I know there is a dex method count limit of 65k. I got an APK that contains 64k methods in its dex and I can install and run it just fine on and Android 4+ device, but not on an Android 2.3 device. Is there a different dex method count limit in older Android versions?
Asked
Active
Viewed 255 times
2
-
What is causing you to have 64k methods? If you're using Google Play services and Android Studio, you could take advantage of [granular dependencies](http://developer.android.com/google/play-services/setup.html#split) and only include the parts you need. – ianhanniballake Mar 12 '15 at 18:43
-
On 2.x there is a 5MB dexopt buffer limit. You are probably hitting that and not the "number of methods" limit. See http://stackoverflow.com/questions/21878324/running-apps-containing-large-amount-of-code – David Wasser Mar 12 '15 at 18:46
-
1@DavidWasser Thanks that seems to be it. The dex is actually over 9MB. If you write it again as answer instead of a comment, then I'll mark it as accepted. Grüsse nach Deutschland :-) – SimonSays Mar 12 '15 at 18:58
1 Answers
1
On 2.x there is a 5MB dexopt buffer limit. You are probably hitting that and not the "number of methods" limit. See Running apps containing large amount of code

Community
- 1
- 1

David Wasser
- 93,459
- 16
- 209
- 274