Questions tagged [android-multidex]

Multidex is an Android technology that splits the classes of an Application (and its dependencies) into multiple dex files. (Dex being the format of the classes for the Dalvik/ART VM). Multidex is a workaround the 65 k maximal methods count inside a dex file.

Multidex is an Android technology that splits the classes of an Application (and its dependencies) into multiple dex files. (Dex being the format of the classes for the Dalvik/ART VM). Multidex is a workaround the 65k maximal methods count inside a dex file.

Package Summary

Features

Note that multidex is built-in in Art (Android SDK 5, Lollipop) and is also part of the support libraries

720 questions
6
votes
0 answers

Error: A problem was found with the configuration of task collectDebugMultiDexComponents

I've update Android Studio to 0.9, build tools to 21.1.0 and gradle to 0.14 because I want to use the new multiDexEnabled true feature. Currently I'm managing the multidex using this approach https://github.com/casidiablo/multidex and everything is…
5
votes
4 answers

Installing app takes minutes with dex2oat warnings

I have re-opened an Android Studio project after quite some time, and I'm seeing fast builds as usual, but now the "Install" step from Android Studio (3.5) is taking minutes, while it used to take seconds. If I open the device Logcat while…
natario
  • 24,954
  • 17
  • 88
  • 158
5
votes
1 answer

Android App crashes on release with proguard

My App crashing when I create a release build. The app was working correctly and all of a sudden this happened. I have this line in BaseActivity.java MultiDex.install(this); I have tried multiple options from SO but none of them worked. The error is…
kartoos khan
  • 409
  • 6
  • 22
5
votes
2 answers

Gradle build on linux box fails with "Malformed input or input contains unmappable characters"

I'm getting an exception when I run the android build on the CI machine. For CI we are using docker images based on ubuntu. If I run the build locally it is fine, but when I run it there I'm getting the following exception: * What went…
5
votes
1 answer

Build Failed: Program type already present: com.facebook.ads.Ad

I try to build a module in Android Studio. It seemed to run on device but when I tried to build an APK, I got an error: Program type already present: com.facebook.ads.Ad Here's the complete log: org.gradle.api.tasks.TaskExecutionException:…
5
votes
1 answer

ClassNotFoundException at dalvik.system.BaseDexClassLoader

Did some research on this and found a few posts regarding people facing the same issue in their application. I too am facing this crash in the google console for my app and followed the posts I found (java.lang.ClassNotFoundException…
5
votes
2 answers

Cause: com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/io/IOCase in Studio 3.0

I am developing one project. This is working fine with Android studio 2.3.3, but what happen is when i updated my Android Studio 3.0 and open my project then it can't assembled and it send me below error Log. Error Log Error:Error converting…
Ninja
  • 678
  • 10
  • 26
5
votes
1 answer

Switching between run configurations of two modules without Clean when one of them uses Multidex

In my Android Studio project, I have several modules, of which only two are application modules (let's call them A and B), and the others are library modules, some used by both A and B. For the module A, the multidex is enabled, while for the B it's…
Rick Sanchez
  • 4,528
  • 2
  • 27
  • 53
5
votes
3 answers

Cannot Instant Run: legacy multi-dex on Dalvik runtime

When I ran my app, it said that Cannot Instant Run: legacy multi-dex on Dalvik runtime Does it means that I can't use Instant Run when I use multi-dex? I'm using Android Studio beta4.
tiny sunlight
  • 6,231
  • 3
  • 21
  • 42
5
votes
2 answers

Implementing MultiDex results in compiling for so long, and finally heap space error

I have a big Android project where I got the Unable to execute dex: method ID not in [0, 0xffff]: 65536 error; I believe some of you guys have definitely gone through this issue before. This is an error due to too many methods referenced in the…
technophyle
  • 7,972
  • 6
  • 29
  • 50
5
votes
2 answers

Tips for optimizing build time in Android studio?

I have been having horrible build time from android studio and I wanted to know if you have any tips for optimizations. Here is a bit of details on the app I'm currently working on: 65k function limit issue, using the latest multidex fix from the…
4
votes
1 answer

RuntimeException: Unable to instantiate application com.company.app.Application: ClassNotFoundException

I've read a few answers on this site with the same or similar error messages, and I've tried all the solutions already. Sadly, none of them have worked so far. My gradle files all look like they're properly set up for Multidex, the Application class…
Ky -
  • 30,724
  • 51
  • 192
  • 308
4
votes
2 answers

Didn't find class "android.provider.MediaStore$Downloads"

I am using codes given by Bao Lei with the name private fun saveImage at how to save bitmap to android gallery to save bitmap To solve deprecated problems in Kotlin, I removed these lines: //values.put(MediaStore.Images.Media.DATA,…
Member
  • 87
  • 2
  • 9
4
votes
0 answers

How to pass flags to D8 tool?

D8 is a command line tool that Android Studio and the Android Gradle Plugin use to compile project's Java bytecode into DEX bytecode. This command has several options : --output path, --file-per-class, --no-desugaring, --main-dex-list etc. I…
ashakirov
  • 12,112
  • 6
  • 40
  • 40
4
votes
2 answers

Error: Conflict with dependency 'com.android.support:multidex' in project

I created a new android project with the following gradle file: android { ... dexOptions { javaMaxHeapSize "4g" } ... } dependencies { ... compile 'com.linkedin.dexmaker:dexmaker-mockito:2.16.0' ... } But when I…
Insoft
  • 548
  • 6
  • 21