{"record":{"id":"7b06a11d03898806","repo":"slint-ui/slint","slug":"error-running-d8-e","errorCode":null,"errorMessage":"Error running D8: {e}","messagePattern":"Error running D8: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backends/android-activity/build.rs","lineNumber":69,"sourceCode":"        .output()\n        .unwrap_or_else(|e| panic!(\"Could not run the java compiler: {e}\"));\n\n    if !o.status.success() {\n        panic!(\"Java compilation failed: {}\", String::from_utf8_lossy(&o.stderr));\n    }\n\n    let o = Dexer::new()\n        .android_jar(&android_jar)\n        .class_path(&out_class_dir)\n        .collect_classes(&out_class_dir)\n        .unwrap()\n        .release(release_mode)\n        .android_min_api(20) // disable multidex for single dex file output\n        .out_dir(out_dir)\n        .command()\n        .unwrap_or_else(|e| panic!(\"Could not generate the D8 command: {e}\"))\n        .output()\n        .unwrap_or_else(|e| panic!(\"Error running D8: {e}\"));\n\n    if !o.status.success() {\n        eprintln!(\"Dex conversion failed: {}\", String::from_utf8_lossy(&o.stderr));\n        let java_home = android_build::java_home().unwrap();\n        let java_ver = android_build::check_javac_version(&java_home).unwrap();\n        if java_ver >= 21 {\n            eprintln!(\"WARNING: JDK version 21 is known to cause an error with older android SDK\");\n            eprintln!(\"See https://github.com/slint-ui/slint/issues/4973\");\n            eprintln!(\n                \"Try downgrading your version of Java to something like JDK 17, or upgrade to the SDK build tools 35\"\n            );\n        }\n        panic!(\"Dex conversion failed\");\n    }\n\n    println!(\"cargo:rerun-if-changed={java_src_path}\");\n}\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/internal/backends/android-activity/build.rs#L51-L87","documentation":"After constructing the D8 command, the build script runs it; this panic fires when the process itself could not be spawned (as opposed to D8 exiting with an error status, which is handled separately as 'Dex conversion failed'). Typical causes: a missing java executable/JAVA_HOME misconfiguration, insufficient permissions, or the jar path disappearing between construction and execution.","triggerScenarios":"Thrown at internal/backends/android-activity/build.rs:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the java executable from java_home is on PATH and runnable; {e} is the io::Error from spawning D8 (usually the java binary)","Verify JAVA_HOME points to a JDK (not a JRE) and that the D8 wrapper command constructed by Dexer is valid","Increase verbosity of the Dexer command construction and run the emitted command manually to see the failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}