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

cmd cannot recognize dex2jar- Android Apk

i want to get source code from apk and use this solution Is there a way to get the source code from an APK file? i try to dex file to jar and i used dex2jar; but cmd cannot recognize this command. dex2jar classes.dex "dex2jar is not recognized as…
Anil Kocabiyik
  • 1,178
  • 6
  • 17
  • 47
14
votes
2 answers

is it possible to dynamically load a Activity class from a jar library on the sdCard & actually use it?

I have 1 .jar file on sdCard (i used dx tool to compile a usual .jar to dex.. otherwise android will complain at runtime) The class that i want to use is actually a Activity & by "use" i mean Inflate! A) i've noticed that if i load class like this,…
pulancheck1988
  • 2,024
  • 3
  • 28
  • 46
13
votes
1 answer

Use multiDexEnabled without Gradle but Eclipse build process instead

Since the latest SDK version, its much more simple to create applications with multiple dex files ( https://developer.android.com/tools/building/multidex.html ), my question is, can this new feature also be used when I'm not using Gradle for the…
Simon
  • 13,173
  • 14
  • 66
  • 90
13
votes
1 answer

Using Groovy on Android

With the advent of ASMDEX (ASM for dex files) and dexmaker, shouldn't it be possible to port Groovy to Android? Both frameworks allow the generation of dex bytecode at runtime. As I understand it, it is impossible to modify dex classes from the APK…
Dirk Jäckel
  • 2,979
  • 3
  • 29
  • 47
12
votes
5 answers

Dynamic class loading with IntelliJ - 64K method dex issue

I am working on a project that is quickly approaching the 64K method limit for dex files. This Android Developer blog post (from July 2011) explains how to get dynamic class loading working with a command-line build driven by Ant, but does not…
Mark
  • 7,306
  • 8
  • 45
  • 87
12
votes
2 answers

com.android.dx.util.DexException: Multiple dex files define

I use ant release and got this error: [dx] UNEXPECTED TOP-LEVEL EXCEPTION: [dx] com.android.dx.util.DexException: Multiple dex files define Lcom/android/vending/billing/IMarketBillingService; [dx] at…
user2172670
  • 131
  • 2
  • 5
11
votes
12 answers

Cannot fit requested classes in a single dex file, even for earlier commits which previously compiled fine

So I've just hit the maximum method count limit for my android project, which fails to build with the following error message: Error: null, Cannot fit requested classes in a single dex file (# methods: 117407 > 65536) I understand what the message…
James Allen
  • 6,406
  • 8
  • 50
  • 83
11
votes
2 answers

Multiple dex files define Lcom/google/android/gms/internal/measurement/zzabn

Since this morning I cannot build my Android app because I get this error What went wrong: Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'. com.android.build.api.transform.TransformException:…
Alexis
  • 1,825
  • 4
  • 23
  • 28
11
votes
2 answers

Android: Compilation error with v7 support lib 27.1.0 "Program type already present" android.support.v7.recyclerview.extensions.ListAdapter

I think there must be a bug with the 27.1.0 v7 support lib, just released. After updating my project to use it (from 26.1.0), I keep getting this compilation error: Task :app:transformDexArchiveWithDexMergerForRegularDebug FAILED D8 is used to…
11
votes
1 answer

Java reflection handling library changes

Ok so I have an Android app and I started creating an addon system for the app so developers can code content providers that the app can then use to generate different content, I will not go through the whole procedure but everything works fine like…
Amr El Aswar
  • 3,395
  • 3
  • 23
  • 36
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
2 answers

Error When building a large Codename One Application During the Dex Phase

I got an error in the build server when sending an Android build during the dex phase. Googling a bit I learned that there is a hard limit of 64K functions (including all libs, the heaviest is google play services), or you can use the multiple dex…
Derek Johnson
  • 812
  • 5
  • 6
10
votes
6 answers

How to find cause of error when dexing: MethodHandle.invoke and MethodHandle.invokeExact

I have a project that has started throwing this error when building in Android Studio or Gradle: com.android.tools.r8.ApiLevelException: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26) Now…
Clyde
  • 7,389
  • 5
  • 31
  • 57
10
votes
5 answers

app:transformDexArchiveWithExternalLibsDexMergerForDebug in Android studio 3.0.1

Messages Gradle build: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Here is the gradle build…
sanjay sen
  • 113
  • 1
  • 1
  • 6
10
votes
6 answers

Android Studio 3.0 Unable to merge dex

Just Updated android studio from 2.3.3 to 3.0 now I am having the error Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException:…
Cody Kolbert
  • 101
  • 1
  • 1
  • 3