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
8
votes
3 answers

multiDexKeepFile not working

We are having problems in building our multidex App. We keep receiving different java.lang.NoClassDefFoundError erros during the application boot. We noticed that they are very likely related to the multidex issues. As the required classes for…
8
votes
1 answer

Android Espresso multidex fail

We use multidex in our app for a long time but recently with latest update it fails on android API <19 e.g. emulator with api 16 It is standard java.lang.NoClassDefFoundError. If I define multidexKeepProguard for missing class e.g. …
originx
  • 496
  • 6
  • 16
8
votes
1 answer

Android Studio Lint - set API level for lint

Here is the thing. I have an app that is compatible with API 15 and above, but since it's pretty big and I've already hit a 65k methods limit, I had to make it a descendant of MultiDexApplication class. This slows down the build times a bit, so I…
vanomart
  • 1,739
  • 1
  • 18
  • 39
8
votes
1 answer

Enabling MultiDex Support in Android to achieve 65K+ methods in Eclipse

I am trying to build Multidex apk in eclipse, and not able to succeed. I tried following steps, for configuring Multidex support in android app: I have added the Multidex library located at /extras/android/support/multidex/ to my project. As my app…
Shridutt Kothari
  • 7,326
  • 3
  • 41
  • 61
8
votes
1 answer

Is there a way to limit method amount in main dex file while using MultiDex feature in Android Studio

When I enabled MultiDex feature in Android Studio like the document says, it automatically spilted into two or more dex files. I cannot config it. And it seems that in the main dex file, the amount of methods is very close to the limitation(65536).…
Wesley
  • 4,084
  • 6
  • 37
  • 60
8
votes
6 answers

Gradle DSL method not found : 'multiDexEnabled()'

I followed the multidex guide at https://developer.android.com/tools/building/multidex.html But I get this error Gradle DSL method not found : 'multiDexEnabled()' . I have updated Android Built Tools , Android Support Repository and Library. Here is…
bman
  • 3,740
  • 9
  • 34
  • 40
7
votes
0 answers

Code shrinker R8 crashes my Xamarin.Android app on startup with Unable to get provider com.google.firebase.provider.FirebaseInitProvider

I have a Xamarin.Android app which I recently switched to use R8 code shrinker. Unfortunately, my app is crashing on startup with the following error: java.lang.RuntimeException: Unable to get provider…
7
votes
1 answer

Dagger 2 and Multidex application

I'm Using Dagger 2.11 with Android Injection support. After adding a big amount of dependencies i was forced to enable MultiDex. The support for Multidex was added, on Android 4.4 works as expected, on Android >=6 works great. The problem appears…
Eddy
  • 489
  • 4
  • 10
7
votes
5 answers

Getting 'app:transformClassesWithDexForDebug' error on compiling the project having useLibrary 'org.apache.http.legacy' in build.gradle

I'm developing an app in which I'm using this library. On compiling the project, this error containing TransformException and RuntimeException is popping up: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. >…
7
votes
1 answer

Android - What is the purpose of multiDexKeepProguard ? How does it compare to proguardFiles close in gradle?

I have created a multidex app. But in regards to proguard i have the following in build.gradle: android { defaultConfig { ... multiDexEnabled true } productFlavors { dev { // Enable pre-dexing to…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
7
votes
5 answers

How can I check the dex count in android?

My project's gradle file is as below. android { compileSdkVersion 23 buildToolsVersion "25.0.1" buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt') …
SaeHyun Kim
  • 475
  • 2
  • 8
  • 26
7
votes
0 answers

Xamarin Android Multi Dex app with a custom application class that runs on pre-Lollipop

There are a quite a few posts scattered around about this but my question is: Has anyone managed to successfully build a MultiDex enabled app that utilizes a custom Application class that will run on pre - Lollipop devices? For people who wanted to…
Brad Locke
  • 71
  • 1
  • 6
7
votes
2 answers

Java.lang.ClassCastException: Android.support.v7.widget.ContentFrameLayout cannot be cast to Android.support.v7.widget.ContentFrameLayout

There are times when I install my Android app and I get the following exception but this isn't always reproducible. java.lang.ClassCastException: android.support.v7.widget.ContentFrameLayout cannot be cast to …
Juan Acevedo
  • 1,768
  • 2
  • 20
  • 39
7
votes
5 answers

Enable Multidex for Android in Ionic framework

Is there a way to set enable multidex (https://github.com/casidiablo/multidex) for Android if I build apps using Ionic Framework ?
Redturbo
  • 1,563
  • 8
  • 22
  • 34
7
votes
2 answers

Android Multidex RuntimeException

I am trying to solve a problem with running Android app that has over 65k methods. I have followed Google docs about Multidex support, however I'm still unable to run it successfully. It seems that the problem appears only on SDK less than 21,…
jpact
  • 1,042
  • 10
  • 23