revanced-cli
revanced-cli copied to clipboard
problem: NoClassDefFoundError on self built CLI
🐞 Issue
When I build the revanced cli and use it, there is an error. When I download the revanced cli from the releases, there is not an error.
⚙ Reproduce
Steps and error:
~> git clone https://github.com/revanced/revanced-cli
~> ./gradlew build
~> java -jar ./revanced-cli/build/libs/revanced-cli-2.5.3-all.jar -a ./youtube-17.26.35.apk -b ./revanced-patches/build/libs/revanced-patches-2.13.3.jar -c -d R5CRC3QQHQE -m ./app-release-unsigned-0.22.1.apk -o revanced-17.26.35.apk
Exception in thread "main" java.lang.NoClassDefFoundError: brut/directory/ExtFile
at app.revanced.patcher.Patcher.<init>(Patcher.kt:50)
at app.revanced.cli.command.MainCommand.run(MainCommand.kt:147)
at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at app.revanced.cli.main.MainKt.main(Main.kt:7)
Caused by: java.lang.ClassNotFoundException: brut.directory.ExtFile
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 11 more
~> java --version
openjdk 17.0.3 2022-04-19 LTS
OpenJDK Runtime Environment Zulu17.34+19-CA (build 17.0.3+7-LTS)
OpenJDK 64-Bit Server VM Zulu17.34+19-CA (build 17.0.3+7-LTS, mixed mode, sharing)
🛠 Solution
⚠ Additional context
There must be some problem with my dev environment, as the jarfile built by github releases works unlike the jarfile buil by myself. I just cannot figure out what could be different.
What is the output of the build.
~> ./gradlew build
BUILD SUCCESSFUL in 32s
4 actionable tasks: 4 executed
@oSumAtrIX any ideas?
Unfortunately not. Replicate the environment of the workflow and compare what is different on yours.