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

Count number of method in a Library (Jar/AAR)

How do we count the number of methods in a Library file. For eg, a Jar or AAR. This is required to know the number of android resource IDs used by the library used by the project. This would help in estimating how close we are to 65K dex limit in…
B.B.
  • 924
  • 2
  • 11
  • 28
7
votes
1 answer

Android/Scala project in IntelliJ 14 compiles, but crashes when launched not finding Scala class

I created a new Android project in Intellij 14, then added Scala SDK 2.11.6 to it (scope provided was the only option that worked for me). The project runs fine if I don't use any Scala class. But once I use, say, string interpolation, as soon as…
Phil
  • 5,595
  • 5
  • 35
  • 55
7
votes
1 answer

Hitting 65k Dex method limit but dex-method-count tools says there is much fewer

We've struggled with the 65k method limit for a long time and have done most of the optimizations already. Now I'm trying to add the Jacoco plugin and I'm getting the dex limit error again: Error:Execution failed for task…
odiggity
  • 4,117
  • 7
  • 34
  • 41
7
votes
1 answer

Install crashlytics without fabric?

Fabric adds 1k methods of its own without the use of twitter kit, or mopub. I just want to use crashlytics without retrieving it from fabric repos. How can I accomplish such? Can one point me towards crashlytics only maven/gradle repos?
sirvon
  • 2,547
  • 1
  • 31
  • 55
7
votes
2 answers

Proguard Obfuscation causing dex compliation to throw Exceptions

I have an android app that I am only trying to obfuscate with Proguard(hence, I have the -dontoptimize -dontshrink -dontpreverify flags). When I build with Proguard, proguard itself does not throw any errors, but then dex throws the following…
Caleb An
  • 366
  • 1
  • 10
7
votes
1 answer

"trouble writing output: Too many field references: 70185; max is 65536. You may try using --multi-dex option." when building Android project

I hit this error and found no hits for the error message, so I thought I'd share the solution I came up with to save anyone else facing the problem repeating my work. When writing a new Android library (apklib) for use in a (large) application, I'm…
blahdiblah
  • 33,069
  • 21
  • 98
  • 152
7
votes
4 answers

UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException

I am trying to integrate barcodefraglibv2 into my android app in AndroidStudio. I tried to copy libs core.jar and barcodelib.jar into libs directory. However when I try to run application, I get following error Error:Execution failed for task…
pfulop
  • 1,009
  • 13
  • 24
7
votes
2 answers

DX Error when running Android Studio project

I am trying to set up my Android Studio project with al its dependencies. But when i try to run my project i get the following error messages: Android Dex: [AndroidVI] Unable to execute DX Android Dex: [AndroidVI] com.android.dx.util.DexException:…
sn0ep
  • 3,843
  • 8
  • 39
  • 63
7
votes
3 answers

Cannot compile, Unable to execute dex, cannot merge, non-jumbo instruction

I'm needing some help because I can't get the solution by my own, I had read a lot of post and investigating a lot but without solution. I've a proyect that have some subprojects ( actionbar,sliding,facebook,etc.. ) and when I try to compile it I…
forlayo
  • 1,371
  • 2
  • 13
  • 23
7
votes
1 answer

"GC Overhead limit exceeded" after adding a dependency

Similarly to this question, I received the following error: [INFO] --- android-maven-plugin:3.3.0:dex (default-dex) @ betodef-android --- [INFO] /usr/lib/jvm/java-6-sun-1.6.0.32/jre/bin/java [-Xmx1024M, {snip} [INFO] [INFO] UNEXPECTED TOP-LEVEL…
mikołak
  • 9,605
  • 1
  • 48
  • 70
7
votes
5 answers

Unable to execute dex: Multiple dex files define Lcom/google/android/gcm/GCMBaseIntentService;

I'm busy for a school assignment to create a timetable app which fetches data from my database by JSON. I use the GCM service for push notifications and Johan Nilsson's Android Actionbar. However, when I try to export my application to an .APK file…
Mattias te Wierik
  • 143
  • 1
  • 3
  • 7
7
votes
3 answers

Error Importing Jar to Android Project

This is a recently problem with the new SDK for Android. Now Android SDK uses the ANT convention when import external jars to the apk package, the external jars must be on the "lib" folder and the SDK ever will export the jars from that folder. My…
Rafael Carrillo
  • 2,772
  • 9
  • 43
  • 64
6
votes
2 answers

ZipException while converting to dex with Ant, in eclipse it works ok

I have a project that builds ok in Eclipse but throws a ZipException when executing "ant debug". The output is the following (paths and project name excluded) -dex: [dex] Converting compiled files and external libraries into…
Maragues
  • 37,861
  • 14
  • 95
  • 96
6
votes
6 answers

Error when building apk - "Multiple dex files define Lcom/google/ads/Ad"

I've been tearing my hair out over this one, for the past 3 hours I've been trying to fix it but have been unable to. I've created an android app and I'm ready to put it on the android market but I get this error when trying to export to an…
Stratus
  • 373
  • 1
  • 4
  • 9
6
votes
1 answer

Porting java server to Android

I'm working on developing a medical records system using OpenMRS as a backend for Android. OpenMRS is dependent on some seriously heavyweight libraries, including Hibernate and Spring. "Dexing" the entire OpenMRS application generates a file that's…
Nick
  • 451
  • 4
  • 10