I see ant script of Android has message that it is "pre-dexing". However dex and pre-dex uses same options, except that in one case one jar at a time, in other case multiple jars at a time.
What is the real need? Is pre-dex mandatory?
e.g
The ' characters around the executable and arguments are not part of the command. [dex] Pre-Dexing F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar -> pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar [dx] Current OS is Windows 7 [dx] Executing 'D:\Apps\java\embd\cmn\android\oems\google\adt\4.x\4.3.x\4.3\sdk\build-tools\18.1.0\dx.bat' with arguments: [dx] '--dex' [dx] '--output' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar' [dx] [dx] The ' characters around the executable and arguments are [dx] not part of the command. Execute:Java13CommandLauncher: Executing 'D:\Apps\java\embd\cmn\android\oems\google\adt\4.x\4.3.x\4.3\sdk\build-tools\18.1.0\dx.bat' with arguments: '--dex' '--output' 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar' 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar' The ' characters around the executable and arguments are not part of the command. [dex] Converting compiled files and external libraries into F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\classes.dex... [dx] Current OS is Windows 7 [dx] Executing 'D:\Apps\java\embd\cmn\android\oems\google\adt\4.x\4.3.x\4.3\sdk\build-tools\18.1.0\dx.bat' with arguments: [dx] '--dex' [dx] '--output' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\classes.dex' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\classes' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-144740ee5cf8b90b747300d19fb8201e.jar' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-1593da1bb60c5ec741aca494963e04a3.jar' [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-37bb5269e4fbd6dda9900fea95c0c29b.jar'
Dexing is the process of converting standard Java JVM byte code (in the form of a . jar archive file created by the compiler) into Android's native format, Dalvik or ART. This is done by a tool called dex or its more modern replacement d8 , which is part of the standard Android build tools.
A performance class defines a set of device capabilities that goes beyond Android's baseline requirements. Each version of Android has its own corresponding performance class, which is defined in that version's Android Compatibility Definition Document (CDD).
According to Android Studio's official system requirements, it takes at minimum 3 GB RAM to run smoothly. Honestly, its a lot and I believe that is the biggest cause of being it too slow all the time.
It's useful to remember in this case that you are working in Java, which is not exactly the same thing as the Dalvik runtime. Java, from Oracle, uses a completely different virtual machine, while Dalvik is specifically fine-tuned for mobile devices.
The DEX processes take your Java compiled JAR files and converts them into Dalvik Executable Files (.dex) files that will run on Android. The Oracle JVM uses different bytecode than the Dalvik runtime, making this step a necessity.
There is a process for libraries you might have included in your project, as they are also compiled with a standard Java compiler, and then another process for your actual project.
It's done in two steps as the final process, your application, requires access to already dexed library files to avoid having references to code change while the process is busy.
You can find out more at http://source.android.com/devices/tech/dalvik/index.html - where you will also see that Dalvik is scheduled for replacement with something called ART.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With