Skip to main content
Participant
August 19, 2015
Question

Solutions for Android 65k method limit?

  • August 19, 2015
  • 3 replies
  • 1383 views

In my project, I'm currently running into the "Too many method references" error. The limit is 65k when trying to build for Android APK. This is because we're using a lot of extensions, expecially Google Play Services, which apparently takes up around 20k methods by itself.

Android native compiling mentions the use of the multi-dex option when building the APK, but I'm not sure how to enable that for ADT or Flash Builder. Anyone have any idea how to get past this limit?

This topic has been closed for replies.

3 replies

Participant
January 17, 2018

Many times when integrating multiple SDKs, some of the files included are actually the same. So with multiple SDKs comes multiple of the same file, which definitely increases your dex limit.  When using Enhance to integrate SDKs, the duplicate files are removed.  Why have multiple of the same file when you can just share one single file.

Using Enhance, you can now integrate all of the services that providers offer without ever having to touch an SDK again. With little to NO coding at all and without touching source code, Enhance® is the easiest way to integrate 3rd party services into your project or to keep them up to date. (Ads, Mediation, Analytics, Attribution, Crash Reporting and more) No more SDK integration!!!

When integrating these services with Enhance, you can actually reduce your apk size.

Follow the link for more information on Enhance and how it can help with integrations and dex limits : https://goo.gl/qY79eb

Good Luck!

kxRbCu4.png

gennadiyr50003368
Participant
August 28, 2016

I've successfully implemented solution with loading second dex file at start and invoking classes via reflection

android - Create Multidex Application with Adobe Flash Builder - Stack Overflow

eazyigz
Participating Frequently
August 9, 2016

Is there a solution to this problem?  I cannot use android:name="android.support.multidex.MultiDexApplication" in manifestAdditions.