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 New Relic Mobile 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:
- Make sure you have the latest Android agent version for New Relic Mobile.
- Enable multidex.
- Enable Proguard or Dexguard to optimize classes and methods in your DEX.
- If you still have problems with keeping your Android app under the 64k limit, use a keepfile.
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.