{"record":{"id":"fb64ff00a3d9d6c9","repo":"slint-ui/slint","slug":"java-compilation-failed","errorCode":null,"errorMessage":"Java compilation failed: {}","messagePattern":"Java compilation failed: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backends/android-activity/build.rs","lineNumber":55,"sourceCode":"    let o = JavaBuild::new()\n        .file(&java_src_path)\n        .class_path(&android_jar)\n        .classes_out_dir(&out_class_dir)\n        .java_source_version(8)\n        .java_target_version(8)\n        .debug_info(android_build::DebugInfo {\n            line_numbers: !release_mode,\n            variables: !release_mode,\n            source_files: !release_mode,\n        })\n        .command()\n        .unwrap_or_else(|e| panic!(\"Could not generate the java compiler command: {e}\"))\n        .args([\"-encoding\", \"UTF-8\"])\n        .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();","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/backends/android-activity/build.rs#L37-L73","documentation":"Error \"Java compilation failed: {}\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/backends/android-activity/build.rs:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the Java compilation error printed with the error message.","Verify the JDK version used by the Android build matches the required version."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}