JesusFreke / smali

smali/baksmali
6.29k stars 1.07k forks source link

Cannot build smali with Java 11 #787

Open bursoft-git opened 3 years ago

bursoft-git commented 3 years ago
c:\Downloads\smali-c1534fc96df4f7949052228df07335b0ddce5d83>gradlew proguard
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Task :dexlib2:compileJava
Note: C:\Downloads\smali-c1534fc96df4f7949052228df07335b0ddce5d83\dexlib2\src\main\java\org\jf\dexlib2\analysis\CustomInlineMethodResolver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :baksmali:proguard FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':baksmali:proguard'.
> java.io.IOException: Can't read [C:\Downloads\smali-c1534fc96df4f7949052228df07335b0ddce5d83\baksmali\build\libs\baksmali-2.4.0-dev-fat.jar] (Can't process class [org/jf/baksmali/Adaptors/AnnotationFormatter.class] (Unsupported class version number [55.0] (maximum 52.0, Java 1.8)))

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s
14 actionable tasks: 14 executed
iBotPeaches commented 3 years ago

Worked for me now @bursoft-git, you are probably good after https://github.com/JesusFreke/smali/commit/1d72698081c108957053ffe15b710a94be519f75

bursoft-git commented 3 years ago

There is another error with latest commit https://github.com/JesusFreke/smali/commit/cbd41d36ccde221ccc4ec2aa0c15ca2fa4491a62

C:\smali-cbd41d36ccde221ccc4ec2aa0c15ca2fa4491a62>gradlew proguard
Downloading https://services.gradle.org/distributions/gradle-6.8.2-all.zip
..............10%..............20%...............30%..............40%..............50%...............60%..............70
%..............80%...............90%..............100%

Welcome to Gradle 6.8.2!

Here are the highlights of this release:
 - Faster Kotlin DSL script compilation
 - Vendor selection for Java toolchains
 - Convenient execution of tasks in composite builds
 - Consistent dependency resolution

For more details see https://docs.gradle.org/6.8.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :dexlib2:compileJava
Note: C:\smali-cbd41d36ccde221ccc4ec2aa0c15ca2fa4491a62\dexlib2\src\main\java\org\jf\dexlib2\analysis\CustomInlineMethodResolver.java uses or override
s a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :baksmali:fatJar FAILED

> Task :smali:compileJava
Note: C:\smali-cbd41d36ccde221ccc4ec2aa0c15ca2fa4491a62\smali\build\generated-src\antlr\main\org\jf\smali\smaliTreeWalker.java uses unchecked or unsaf
e operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':baksmali:fatJar'.
> Cannot expand ZIP 'C:\smali-cbd41d36ccde221ccc4ec2aa0c15ca2fa4491a62\util\build\libs\util-2.5.2-dev.jar' as it does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with
--scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 43s
9 actionable tasks: 9 executed