skip to Main Content

I used to create dex file with dx.bat like this :

"c:SDKsandroidbuild-tools32.0.0dx.bat" –dex
–output=C:DevMagicFoundationAlcinoeToolsAddRJavaToClassesDextmpclasses.dex
C:DevMagicFoundationAlcinoeToolsAddRJavaToClassesDextmpobj.zip

How to do the same with d8.bat?

2

Answers


  1. Creating DEX file using d8 can be achieved using:

    d8 --output <output-folder> <input-files>
    

    In your case, the following is an equivalent:

    c:SDKsandroidbuild-tools32.0.0d8.bat --output C:DevMagicFoundationAlcinoeToolsAddRJavaToClassesDextmp C:DevMagicFoundationAlcinoeToolsAddRJavaToClassesDextmpobj.zip
    
    Login or Signup to reply.
  2. To anyone who is using d8.bat with OpenJDK-11, if you encounter the error when running d8.bat:

    -Djava.ext.dirs=${PathToAndroidSDK}build-tools${BuildToolVersion}lib is not supported. Use -classpath instead.

    Error: Could not create the Java Virtual Machine.

    Error: A fatal exception has occurred. Program will exit.

    You can edit d8.bat with a text editor, replacing the code -Djava.ext.dirs="%frameworkdir%" in last line to -classpath "%frameworkdir%" to fix the error.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search