• Log inStart now

Android app exceeds 64k multidex limit

Problem

Your Android app exceeds the 64k limit for the total number of methods that can be referenced within a single Dalvik Executable file (DEX), including methods for frameworks, libraries, and your own Android app code. You see error messages from the agent such as these:

These exception errors typically occur with Android devices prior to Android 5.0 (API level 21), which requires the multidex support library.

Solution

To fix build errors or runtime exceptions when using the latest Android build tool:

  1. Make sure you have the latest Android agent version.
  2. Enable multidex.
  3. Enable Proguard or Dexguard to optimize classes and methods in your DEX.
  4. If you still have problems with keeping your Android app under the 64k limit, use a keepfile.
Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.