Questions tagged [dx]

DX is a tool that comes with the Android SDK that is used to convert Java bytecode to Dalvik bytecode

DX is a tool that comes with the Android SDK that is used to convert Java bytecode to Dalvik bytecode.

DX is being replaced by D8.

References

78 questions
4
votes
1 answer

Bad class file magic when using dx.bat

I need to build my Android application using the command line, when I get to the point that I must use dx.bat to convert to Dalvik bytecode dx.bat --dex --output=C:/local_programs/testProject/bin/classes.dex…
TurnsCoffeeIntoScripts
  • 3,868
  • 8
  • 41
  • 46
4
votes
0 answers

How to convert Stack based instructions to Register based

This is what I have tested with the dis module in python - >>> def f(): ... a = 1 ... b = 2 ... c = 3 ... a = b + c * a ... return a + c ... >>> dis.dis(f) 2 0 LOAD_CONST 1 (1) 2 STORE_FAST …
Dean
  • 427
  • 1
  • 4
  • 8
4
votes
4 answers

Build fails due to missing dx.jar

Whenever I try to build the project, it shows the following error, Error:Execution failed for task ':app:transformClassesWithDexForDebug'> com.android.build.api.transform.TransformException: java.lang.RuntimeException:…
Urja Pawar
  • 1,087
  • 1
  • 15
  • 29
4
votes
2 answers

ParseException for org.osmdroid.DefaultResourceProxyTest

When I try to run this Android project in Eclipse Kepler 4.3.2 on Ubuntu 13.10. the dexer throws this ParseException: $ Dx UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.iface.ParseException: class name …
JJD
  • 50,076
  • 60
  • 203
  • 339
4
votes
1 answer

Dx Warning when run my android application

Hi when I launch the application I get this error repeated several times, and each time with a differente package: Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (org.ibex.nestedvm.util.Sort$1) that doesn't come with…
Teo
  • 3,143
  • 2
  • 29
  • 59
3
votes
2 answers

Dx warning: Ignoring InnerClasses .. for org.apache.tools.ant

I encountered this set of warnings which made memory overflow and eventually crashed Eclipse. This is an Android application with twitter4J core jar included as a reference library. This is using Google APIs (com.google.android.) so I set the target…
Macchiato13
  • 103
  • 3
  • 8
3
votes
3 answers

compiling Jars and add them to android project

Ok here is the thing, i put days into it, searching all the data base, so it's either i didn't search for the right words or there is no answer for it, hopefully “yet”. Symptoms: -compiling the Android project DX compile all the jars every time the…
Ben
  • 91
  • 1
  • 7
3
votes
0 answers

Kotlin compiler on android

I'm trying to create a dex of the huge jar of the kotlin commandline compiler, so I can develop (i.e. compile) kotlin on a phone (in termux). But dx runs out of RAM and is "Killed". So, maybe divide into smaller dexs, and run as multidex? (also,…
hyperpallium
  • 571
  • 5
  • 18
3
votes
1 answer

Wildcard in main-dex-list during dex file creation

I would like to have all of my classes in specified package reside in main dex file. Is there option to use a wildcard there?
pixel
  • 24,905
  • 36
  • 149
  • 251
3
votes
2 answers

java dx utility: UNEXPECTED TOP-LEVEL ERROR java.lang.ExceptionInInitializerError

I'm trying to convert a normal Java application library for use on Android. The library dates from Java 1.1 and has been maintained, improved, etc, all this time, and is in service on other platforms so it's unlikely that the source code is…
Richard T
  • 4,570
  • 5
  • 37
  • 49
2
votes
0 answers

d8: strange exception when using it from command line

Given i added d8.bat to my PATH, I tried to compile a folder of java classes into classes.dex using the modern tool d8 (which replaced dx). However when I followed the example in the documentation, dx *.class I got this error Exception in thread…
Amin Guermazi
  • 1,632
  • 9
  • 19
2
votes
1 answer

Why does Android keep DX when it was replaced by D8?

Why does Android still keep DX along its newer replacement D8? cd cmdline-tools/build-tools/30.0.3 && ls d* Result: d8 dexdump dx Here is the program I used (file Primes.java): class Primes { private static boolean isPrime(int p) { …
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
2
votes
2 answers

how to use java core lib not supported in Android?

There is trouble when using core class in android Dx trouble processing "javax/xml/bind/Binder.class" I do need the classes in javax.xml.* for developing web services, but it is not fully supported in Android. When I import these jars, there is…
xat
  • 85
  • 2
  • 5
2
votes
1 answer

how to use dx to generate dex file for java program referencing external package libraries

I'm a newbie Android developer and wish to know how to use dx to generate the dex file/s for a java program that references external package libraries. Ultimately, I'm trying to run this generated dex file/s using dalvikvm at command line within an…
user761567
  • 213
  • 3
  • 8
2
votes
1 answer

Error while running dx or d8 tool for Android

I am trying to build Android apps manually from the command line. But, whenever I am running dx.bat command which is located inside the Android SDK build-tools directory, I am always getting an error. Whichever option I give, I always get the same…
Puspam
  • 2,137
  • 2
  • 12
  • 35