Questions tagged [dex]

.dex files are compiled Android application code files.

Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically translating compiled applications written in the Java programming language.

867 questions
27
votes
7 answers

How to solve the issue with Dalvik compiler limitation on 64K methods?

My team and I have inherited a large Android project from another team. The whole application with all the included libraries is reported to have around 35000 methods. We now have the task to implement a new service in the app where we need to use…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
26
votes
3 answers

ExceptionWithContext gets thrown when trying to build an Android app with Ant

I've tried searching around both on Google and on stackoverflow for an answer to this, but I've been unable to find anyone with the exact issue I'm having. I'm attempting to set up a continuous integration server (Bamboo, specifically) to update,…
Alex
  • 980
  • 8
  • 20
25
votes
2 answers

Android: Jumbo Mode vs Multidex

I'm not totally sure what the difference is between setting dex option "jumbomode" to true vs adding multidex support. Setting jumbo mode to true or multidex to true seems to fix the problem below AGPBI: {"kind":"SIMPLE","text":"UNEXPECTED TOP-LEVEL…
Ivan Thai
  • 351
  • 1
  • 4
  • 12
25
votes
1 answer

What is Android Pre-Dexing and how to does it increase performance?

I see ant script of Android has message that it is "pre-dexing". However dex and pre-dex uses same options, except that in one case one jar at a time, in other case multiple jars at a time. What is the real need? Is pre-dex mandatory? e.g The '…
Raja Nagendra Kumar
  • 427
  • 1
  • 5
  • 12
25
votes
1 answer

Do inherited methods count against the Dex method limit in Android?

Dalvik has this well-known limitation on the number of methods it can have in a single .dex file (about 65,536 of them). My question is whether inherited (but not overridden) methods count against this limit or not. To make things concrete, suppose…
Adrian Petrescu
  • 16,629
  • 6
  • 56
  • 82
24
votes
3 answers

Gradle builds really slow with a multi-project structure

When building with gradle on a multi-project setup containing roughly 140 projects/libraries, the build time took 1 hour and 22 minutes. And i was using --parallel. And our ANT build takes less than 20 minutes without parallel building. Here is…
prolink007
  • 33,872
  • 24
  • 117
  • 185
23
votes
3 answers

dexexception: not support version

I was trying to convert apk to source code. When I entered below command ./d2j-dex2jar.sh classes.dex I got this exception: com.googlecode.d2j.DexException: not support version. at…
anandhu
  • 243
  • 1
  • 2
  • 6
21
votes
3 answers

Android Studios RuntimeException: Unexpected exception in dex writer thread

I have been getting this strange error the whole of today - anyone know what is going wrong here? As far as I know, I have been using the multidex library correctly (the below is from the app.gradle file): defaultConfig { applicationId…
Simon
  • 19,658
  • 27
  • 149
  • 217
21
votes
3 answers

Usage of MultiDexApplication causes Robolectric test for the Application class to break

Adding Multi dex support with the support v4-r21 using gradle def (https://plus.google.com/+IanLake/posts/JW9x4pcB1rj) apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion "20.0.0" defaultConfig { …
Rickster
  • 1,393
  • 3
  • 13
  • 19
20
votes
1 answer

How to execute the dex file in android with command?

Can any body please share the method to execute the dex file in android with command? This is just to understand.
Pratik
  • 1,596
  • 2
  • 13
  • 10
19
votes
5 answers

How to convert .jar or .class to .dex file?

I'm going to edit the Opera Mini v6.5 server because it is blocked in our country. Now I have unpacked the ‍‍‍‍‍‍‍.apk file extracted classes.Dex then converted it via dex2jar.bat, now modified the server. My problem is I want to repack the .jar or…
Sadra
  • 2,480
  • 2
  • 20
  • 32
19
votes
4 answers

64k limit exceeded on older APIs than lollipop, but not newer

So I am wondering why I encounter the 64k dex method limit when trying to run my app on android versions older than lollipop, when it runs just fine on the more recent versions. Could it be, because the support libraries are actually being…
Jakob Harteg
  • 9,587
  • 15
  • 56
  • 78
19
votes
1 answer

DexIndexOverflowException: Cannot merge new index 65772 into a non-jumbo instruction!: Jumbo Mode? and/or Multi-Dex? What is behind the scene?

I have tried to set jumboMode in gradle for my project, it seems able to solve the following DexIndexOverflowException: com.android.dex.DexException: Cannot merge new index 65536 into a non-jumbo instruction! DexIndexOverflowException: Cannot merge…
19
votes
3 answers

What is the "Android Private Libraries" folder in Eclipse?

I initially thought it was exclusively for official libraries like the support library. However any time I add a custom JAR using the "Add to build path" menu item, it automatically shows up in both "Referenced Libraries" and "Android Private…
Monstieur
  • 7,992
  • 10
  • 51
  • 77
18
votes
7 answers

Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;

I got this error when we run apk file of our application. In build.gradle we set multidex and compile multidex is existed in Gradle file . We changed the version of Firebase versions to above and below but that's did not work for us . This is our…
Aly
  • 4,425
  • 2
  • 13
  • 23
1 2
3
57 58