-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Milestone
Description
Information
- Source Version - https://github.com/iBotPeaches/Apktool main branch addfcdc
- Operating System - Ubuntu 22.04.5 LTS (server)
- Java Version (
java --version) - openjdk 21.0.8
Log
> Task :brut.apktool:apktool-lib:test
brut.androlib.BuildAndDecodeApkTest > classMethod FAILED
java.awt.AWTError at BuildAndDecodeApkTest.java:53
brut.androlib.LargeIntsInManifestTest > checkIfLargeIntsAreHandledTest FAILED
java.lang.NoClassDefFoundError at LargeIntsInManifestTest.java:40
Caused by: java.lang.ExceptionInInitializerError at X11GraphicsEnvironment.java:-2
brut.androlib.ProtectedChunksTest > checkIfDecodeWorksWithoutCrash FAILED
java.lang.NoClassDefFoundError at ProtectedChunksTest.java:39
Caused by: java.lang.ExceptionInInitializerError at X11GraphicsEnvironment.java:-2
brut.androlib.SkipAssetTest > checkControl FAILED
java.lang.NoClassDefFoundError at SkipAssetTest.java:55
Caused by: java.lang.ExceptionInInitializerError at X11GraphicsEnvironment.java:-2
brut.androlib.SkipAssetTest > checkIfEnablingSkipAssetWorks FAILED
java.lang.NoClassDefFoundError at SkipAssetTest.java:42
Caused by: java.lang.ExceptionInInitializerError at X11GraphicsEnvironment.java:-2
106 tests completed, 5 failed
> Task :brut.apktool:apktool-lib:test FAILED
Steps to Reproduce
./gradlew build shadowJar proguard
Suggested fix
Sorry I can't make a pull request. Please consider doing this:
$ git diff
diff --git a/brut.apktool/apktool-lib/build.gradle.kts b/brut.apktool/apktool-lib/build.gradle.kts
index 4c1916d1..08892ae2 100644
--- a/brut.apktool/apktool-lib/build.gradle.kts
+++ b/brut.apktool/apktool-lib/build.gradle.kts
@@ -30,5 +30,9 @@ tasks {
// Increases validation of extra field of zip header. Some older Android apps
// used this field to store data violating the zip specification.
systemProperty("jdk.util.zip.disableZip64ExtraFieldValidation", true)
+
+ // Fix for AWT/X11 graphics environment issues in headless environments
+ // Required for tests that use ImageIO operations (nine-patch processing, etc.)
+ systemProperty("java.awt.headless", true)
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels