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
9
votes
5 answers

Is there a way to merge two or more .dex files into one .dex file using Scala?

I am doing some hacking on Jan Berkel's SBT Android Plugin and I was wandering if there is a way to merge multiple .dex files into one .dex file that will contain all of them. For example, if I have this: classes1.dex classes2.dex classes3.dex Is…
ioreskovic
  • 5,531
  • 5
  • 39
  • 70
8
votes
8 answers

Multiple dex files error when compiling with ant or Eclipse

I am unable to build my application I am running the latest build tools downloaded today, this started happening after the update. -dex: [dex] Converting compiled files and external libraries into …
Rob
  • 7,039
  • 4
  • 44
  • 75
8
votes
5 answers

Android Studio: Error while generating the main dex list

I was trying to completely remove firebase dependencies from my project but I have manage somehow to completely screw my gradle and I need help in order to make it work again. I need to have the google play service dependencies because I am working…
cylegend
  • 163
  • 1
  • 2
  • 12
8
votes
1 answer

Difference between android.enableD8.desugaring in Android Studio 3.1 and android.enableD8

In Android Studio 3.0 there is an option android.enableD8 to enable D8 (Next-generation Dex Compiler). In Android Studio 3.1 a new option was added for this like android.enableD8.desugaring as per their updates. What actually does…
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
8
votes
1 answer

Replace new method dexlib2 failing

I am using dexlib2 to rewriting existing apk through one jar utility. I want to change one instruction with my own instruction. It is basically returning some object and I want to replace it with another method which is returning different object.…
chikka.anddev
  • 9,569
  • 7
  • 38
  • 46
8
votes
3 answers

Android app slow initial startup time

After I started using UI elements from the android support design library the app initial load time has become really slow (about 8 seconds!) and I am really not sure why. I ran method tracking during most of the startup (It takes time for android…
TomerZ
  • 615
  • 6
  • 17
8
votes
1 answer

Smali .local format

I disassembled an Android application with baksmali, and studied the produced smali code. One of the classes contains the following line: .local v1, "future":Lcom/android/volley/toolbox/RequestFuture;,…
user2340612
  • 10,053
  • 4
  • 41
  • 66
8
votes
1 answer

Difference between packed switch and sparse switch dalvik opcode

I want to know the difference between packed switch and sparse switch opcodes in dalvik. Please if you can provide examples. The explanation provided by google is unclear to me. packed-switch sparse switch Thanks.
P basak
  • 4,874
  • 11
  • 40
  • 63
8
votes
12 answers

Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr

I have created a library project for my app. When I try to add the library to a project, I get the following error when trying to run it: [2013-02-07 04:51:26 - Dex Loader] Unable to execute dex: Multiple dex files define…
Andreas H
  • 131
  • 1
  • 1
  • 5
8
votes
5 answers

Automatic transformation of Android's dex code

I want to transform/instrument Dex files. The goals of transformation include measuring code coverage. Note that the source files are not available. So instrumenting Dex is the only option. I am wondering if there are any existing code base that I…
Saswat Anand
  • 358
  • 2
  • 10
7
votes
2 answers

Managing android projects from command line

I am managing and running my android app from command line without using ant, I followed these steps: generate R.java compile R.java and all .java files in src to .class files assembling set of class files into dex file using the command below dx…
rajNaveen
  • 145
  • 7
7
votes
0 answers

Build failed: Failed to process jetified- Android Jetpack

I'm migrating an existing project to AndroidX, to use Android Jetpack. Every time the project tries to build, one of these errors shows up: com.android.builder.dexing.DexArchiveBuilderException: Failed to process…
Bart Ros
  • 419
  • 5
  • 14
7
votes
0 answers

How can I use PathClassLoader to replace the deprecated DexFile APIs?

I've got a class in which I do some runtime annotation scanning, but it uses the deprecated DexFile APIs which causes a warning to appear in LogCat: W/zygote64: Opening an oat file without a class loader. Are you using the deprecated DexFile…
Carter Hudson
  • 1,176
  • 1
  • 11
  • 23
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

Android APK tamper detection from NDK/JNI

Problem I have some keys which I want to keep it safe. At present, a native shared library generates them on demand. This shared library is used by my apk to get keys. The problem with the current implementation is that an attacker might extract…
Programmer
  • 1,290
  • 2
  • 12
  • 16