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

Redundant resource referances in multiple R.java causes DexIndexOverflowException

I have multiple library projects and they all have dependency to Support Library. My application has dependency to these multiple library projects. Every library project contains references to support library's resources in their R.java file. This…
Tony
  • 1,603
  • 3
  • 21
  • 40
10
votes
1 answer

ClassNotFoundException with DexPathList

I have this exception sometimes on my Samsung S3 (4.4 SDK version): Caused by java.lang.ClassNotFoundException: Didn't find class "android.graphics.drawable.Icon" on path: DexPathList[[zip file "/data/app/com.xxxx-1.apk", zip file …
anthony
  • 7,653
  • 8
  • 49
  • 101
10
votes
2 answers

Using .aar NoClassDefFoundError But Class Exists and is Dexed

I have several projects which I build to create an .aar. I then import this .aar into into Android Studio under /libs. The build.gradle file for this dependency looks as follows: repositories{ flatDir{ dirs 'libs' } } dependencies…
Przemek Lach
  • 1,348
  • 2
  • 19
  • 42
10
votes
5 answers

MultiDex support in Android application error

I want to use Android L compat libs. after adding the relevant code to gradle, I get the error: Error Code: 2 Output: objc[36290]: Class JavaLaunchHelper is implemented in both…
dors
  • 5,802
  • 8
  • 45
  • 71
10
votes
1 answer

What is dex in Gradle

What is the dex in Gradle or in Android? In Gradle, what's the meaning of dexoptions? Sometimes my project does not compile because of some dexerrors. I need to activate ProGuard to compile my Android app.
psv
  • 3,147
  • 5
  • 32
  • 67
10
votes
3 answers

Intellij idea showing error: could not create the java virtual machine

I am having trouble with intellij idea ide. It was working fine , but suddenly it started showing error: Android Dex: [untitled3] Error: Could not create the Java Virtual Machine. Android Dex: [untitled3] Error: A fatal exception has occurred.…
hemantsb
  • 2,049
  • 2
  • 20
  • 29
10
votes
3 answers

Error while installing application (INSTALL_FAILED_DEXOPT)

I am working with ccr4j API in Android so when I run my project its thrown an error like: Error while installing application (INSTALL_FAILED_DEXOPT) I find from net and same site also, did all trying like, 1. Uninstalled same application from…
PrashantAdesara
  • 1,897
  • 3
  • 22
  • 41
10
votes
2 answers

Dexopt failed on a very big APK (Out-of-order method_idx) when dex.force.jumbo=true

I have a very big Android project with a multiple, big, 3rd party jars (as Android Libraries). I believe I've hit a Dex's max number of method limitation (compiling via eclipse): [2012-11-18 02:28:45 - Find In Files] Dx processing classes.dex... …
Gili Nachum
  • 5,288
  • 4
  • 31
  • 33
9
votes
1 answer

ClassLoader to replace a pre-loaded class?

General question: Is it possible to use a ClassLoader to replace a pre-loaded (by the system, e.g. found in Android's %android%/frameworks/base/preloaded-classes file) class? Specific: I am attempting to use the DexClassLoader to replace a class…
NuSkooler
  • 5,391
  • 1
  • 34
  • 58
9
votes
2 answers

how to load class dynamically from aar file with DexClassLoader

I have succeeded in dynamically loading classes from a dex file in the following way enter code here File file = getDir("dex", 0); DexClassLoader dexClassLoader = new DexClassLoader("/data/data/com.example.callerapp/files/test.dex",…
woosuk
  • 191
  • 2
  • 11
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
2 answers

JADX output decompile error: "Code decompiled incorrectly, please refer to instructions dump."

I am attempting to decompile a contact duplicate remover Android app using the JADX Dex-to-Java decompiler. However, JADX is generating the following errors in the output: > /* JADX WARNING: inconsistent code. */ > /* Code decompiled…
Jaymin Bhadani
  • 868
  • 5
  • 10
  • 25
9
votes
1 answer

Android Studio APK Analyzer for debug builds

I'm running the latest version of Android Studio (2.2 Preview 1) that was just released and trying to take advantage of some of the new tools. The new APK Analyzer is very useful but I can't get it to work with debug builds, it only seems to be…
Andrea Thacker
  • 3,440
  • 1
  • 25
  • 37
9
votes
5 answers

Failure to install APK [INSTALL_FAILED_DEXOPT] Android Studio

I have tried literally everything to try and rectify this error when trying to deploy an app to an actual android device for debugging but have been unable to solve the matter. Everytime I try to launch I get a failed [INSTALL_FAILED_DEXOPT] error…
Developer Paul
  • 1,502
  • 2
  • 13
  • 18
9
votes
2 answers

DEX fails parsing a jar including BuildConfig and R using Gradle, but worked with Ant

I'm trying to migrate a project over to Android Studio / Gradle but I'm having a bizarre problem with a jar that worked fine using Ant. It seems that R and BuildConfig are included in the jar, and their package name is declared as upper case where…
Jacob Tabak
  • 8,044
  • 3
  • 24
  • 32