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

The number of method references in a .dex file exceed 64K

Currently working on my android application after including play services and firebase library in my project I'm getting this error and unable to run my code :app:prePackageMarkerForDebug :app:transformClassesWithDexForDebug To run dex in…
baldraider
  • 1,049
  • 2
  • 18
  • 48
11
votes
6 answers

How to avoid DEX 64K LIMIT by importing the right library

I had this issue where I overflow the 64k method limit in Dalvik when compiling all the library I used. I started to have this issue when I imported the Support Library, as some are already contained in others, it ended up overflowing the limit. Is…
11
votes
6 answers

Android Gradle Multidex Build issue on API 19

I have a project in which I have enabled multidex to avoid 65k limit and also productFlavors (dev API 21 and prod API 19) for customization. Building my Project on API 21 i.e dev flavor is successful but on API 19 i.e. prod flavor, it is…
Sidakpreet N
  • 137
  • 1
  • 1
  • 10
10
votes
6 answers

multidex - NoClassDefFoundError with multidex enabled

My app is crashing on pre-21 with java.lang.NoClassDefFoundError app.module.SomeClass error. I already have Multidex enabled: build.gradle: android { defaultConfig { ... multiDexEnabled true } } dependencies { ... …
alashow
  • 2,735
  • 3
  • 21
  • 47
10
votes
4 answers

Android Multiple dex files define Lcom/google/android/gms/common/api/zza

Building project and deploying app to the emulator with API level 22 or 25 goes ok, but when i try to build APK or deploy app to my real device with API level 16 i get the following error: Error:Execution failed for task…
oleg.v
  • 1,065
  • 3
  • 11
  • 20
10
votes
2 answers

Android app launch first time launch is taking more time even some time 30 sec and more

Below is log when app is first time installing: 05-12 13:16:23.632 28250-28250/com.app.projectName W/System: ClassLoader referenced unknown path: /data/app/com.app.projectName-1/lib/arm 05-12 13:16:59.041 28250-28250/com.app.projectName W/System:…
Anant Shah
  • 3,744
  • 1
  • 35
  • 48
9
votes
3 answers

com.android.dex.DexIndexOverflowException on Android Studio 3.0

I have a library I use for Espresso tests that when I added to my project I'm not able to compile my tests. Gradle outputs this error Caused by: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536 at…
orelzion
  • 2,452
  • 4
  • 30
  • 46
9
votes
1 answer

Xamarin Android with multidex - bug in debug mode

I created Xamarin Forms app. I use multidex for Android (many libraries). I use multidex.keep file with MultiDexMainDexList option. Now deployment is work. But I get exception in debug mode : System.ArgumentException: The offset and length have…
FetFrumos
  • 5,388
  • 8
  • 60
  • 98
9
votes
1 answer

Android Studio 2.0 Instant Run causes DexFile to not load all classes

I had some code to get a list of all the classes in a package that looked something like this: try { DexFile df = new DexFile(context.getPackageCodePath()); for (Enumeration iter = df.entries(); iter.hasMoreElements();) { …
Kage
  • 765
  • 1
  • 8
  • 27
9
votes
2 answers

RoboGuice 3.0 NoClassDefFoundError: roboguice.inject.ContextScopedRoboInjector

This is not always seen but seen on particular API 14 and 19. Below is the stacktrace java.lang.NoClassDefFoundError: roboguice.inject.ContextScopedRoboInjector at roboguice.RoboGuice.getInjector(RoboGuice.java:197) at…
rsakhale
  • 1,018
  • 13
  • 26
9
votes
1 answer

FlexJson ClassNotFound Exception on Android 4.4.4

I´ve got a multidex project for Android devices. I use Flexjson. I´ve already tested it with flexjson 3.3 and 2.x. It works perfectly well with android 5.x but crashes in Android 4.4.4. It looks like the Dex support library is not working propperly…
eduyayo
  • 2,020
  • 2
  • 15
  • 35
9
votes
2 answers

Android MultiDex - Questions on Inner Workings

I recently discovered the new MultiDex functionality from Android for working with apps having more than 65,000 references. See: https://developer.android.com/tools/building/multidex.html Can someone help me understand the following questions: 1)…
9
votes
2 answers

Android gradle plugin multidex ZipException

I'm trying to use the new multidex option but I get the following error: Execution failed for task ':packageAll[Variant]TestClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: android/support/multidex/BuildConfig.class I've been…
dcow
  • 7,765
  • 3
  • 45
  • 65
8
votes
4 answers

Androidx MutliDex: The number of method references in a .dex file cannot exceed 64K

After migration application from 0.57 => 0.59 I needed to fix some issues for third party packages and now I'm facing dex problem. build.gradle // Top-level build file where you can add configuration options common to all…
copser
  • 2,523
  • 5
  • 38
  • 73
8
votes
3 answers

Duplicate Zip entry MultiDex.class

I have an android app that just went over the method limit so I tried enabling multidex. Once I do it I get the following error: org.gradle.api.tasks.TaskExecutionException: Execution failed for task…
M Rajoy
  • 4,028
  • 14
  • 54
  • 111