Highlighted

Solutions for Android 65k method limit?

Community Beginner ,
Aug 18, 2015

Copy link to clipboard

Copied

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?

TOPICS
Development

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Solutions for Android 65k method limit?

Community Beginner ,
Aug 18, 2015

Copy link to clipboard

Copied

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?

TOPICS
Development

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 18, 2015 2
Community Beginner ,
Aug 09, 2016

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 09, 2016 0
Community Beginner ,
Aug 28, 2016

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 28, 2016 0
Community Beginner ,
Jan 17, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2018 0