JakeWharton / diffuse

Diffuse is a tool for diffing APKs, AABs, AARs, and JARs
Apache License 2.0
1.97k stars 103 forks source link

bin.jar crashes after R8 processing #227

Closed lzb6666 closed 7 months ago

lzb6666 commented 7 months ago

env

Java: openjdk 11.0.21 2023-10-17 LTS OpenJDK Runtime Environment Corretto-11.0.21.9.1 (build 11.0.21+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.21.9.1 (build 11.0.21+9-LTS, mixed mode) OS: Mac os Arch: Arm64 commitId: 583fbf6d85089cb859deeba83a4c6d985ec5f52c

What‘s wrong

java -jar ./diffuse/build/libs/diffuse-0.2.0-SNAPSHOT-binary.jar Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't obtain static method dispose from class com.sun.jna.Native at com.sun.jna.Native.initIDs(Native Method) at com.sun.jna.Native.(SourceFile:248) at com.github.ajalt.mordant.internal.MacosMppImpls.(SourceFile:46) at com.github.ajalt.mordant.internal.MppImplKt.(SourceFile:98) at com.github.ajalt.mordant.terminal.TerminalDetection.detectTerminal(SourceFile:143) at com.github.ajalt.mordant.terminal.StdoutTerminalInterface.(SourceFile:17) at com.github.ajalt.mordant.terminal.Terminal.(SourceFile:56) at com.github.ajalt.mordant.terminal.Terminal.(SourceFile:45) at com.github.ajalt.clikt.core.Context$Builder.(SourceFile:227) at com.github.ajalt.clikt.core.CliktCommand.createContext(SourceFile:312) at com.github.ajalt.clikt.core.CliktCommand.parse$default(SourceFile:456) at com.jakewharton.diffuse.Diffuse.main(SourceFile:475)

More info

java -jar ./diffuse/build/libs/diffuse-0.2.0-SNAPSHOT.jar works well. And binary.jar will work if removing r8 task. image

JakeWharton commented 7 months ago

Yeah I noticed this the other day, too. Haven't had time to fix yet.