2

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 "main" java.nio.file.InvalidPathException: Illegal char <*> at index 0: *.class
        at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPath.parse(Unknown Source)
        at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at java.nio.file.Paths.get(Unknown Source)
        at com.android.tools.r8.b.a(SourceFile:133)
        at com.android.tools.r8.b.a(SourceFile:1)
        at com.android.tools.r8.D8Command.parse(D8Command.java:1)
        at com.android.tools.r8.D8.a(D8.java:4)
        at com.android.tools.r8.utils.w.a(SourceFile:84)
        at com.android.tools.r8.D8.main(D8.java:4)

It works normally when I specify an exact path to a certain class file, but I want to include a lot of files, not just one.

How to fix it ?

Amin Guermazi
  • 1,632
  • 9
  • 19
  • Your example generates 14 lines of gobble-dee-gook. `dx help` (vs. `dx --help`) generates 45 lines. Any reasonable program should generate a one line concise error for a simple typo. Ergo, d8 is not reasonable. – Renate Mar 30 '23 at 12:55

0 Answers0