{"record":{"id":"d3c71ec903c2dfe8","repo":"DioxusLabs/dioxus","slug":"apk-output-not-found-at-ensure-gradle-assemble","errorCode":null,"errorMessage":"APK output not found at {}. Ensure gradle assemble completed successfully.","messagePattern":"APK output not found at (.+?)\\. Ensure gradle assemble completed successfully\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/linux.rs","lineNumber":462,"sourceCode":"    /// project, Android resources, manifests, and native libraries are assembled.\n    /// By the time this method runs, bundling is mostly about surfacing the final\n    /// artifact that should be handed back to the CLI.\n    ///\n    /// Supported package types:\n    /// - [`PackageType::Apk`]: validate that the APK produced by the normal Android\n    ///   assemble flow exists and return its path.\n    /// - [`PackageType::Aab`]: invoke the dedicated Gradle bundle path through\n    ///   `BuildRequest::android_gradle_bundle` and return the generated `.aab`.\n    ///\n    /// This method intentionally does not restage files or rewrite Android metadata.\n    /// It is the bridge from the Android build pipeline to the CLI's common bundle\n    /// reporting interface.\n    pub(crate) async fn bundle_android(&self, package_type: PackageType) -> Result<Vec<PathBuf>> {\n        match package_type {\n            PackageType::Apk => {\n                let apk = self.build.android_apk_path();\n                if !apk.exists() {\n                    bail!(\n                        \"APK output not found at {}. Ensure gradle assemble completed successfully.\",\n                        apk.display()\n                    );\n                }\n                Ok(vec![apk])\n            }\n\n            PackageType::Aab => {\n                let aab = self\n                    .build\n                    .android_gradle_bundle()\n                    .await\n                    .context(\"Failed to run gradle bundleRelease\")?;\n                Ok(vec![aab])\n            }\n            _ => bail!(\"Unsupported Android package type: {package_type:?}\"),\n        }\n    }","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/linux.rs#L444-L480","documentation":"bundle_android checked the APK path that the Gradle assemble flow should have produced and it does not exist. The Android build either failed silently or wrote its output elsewhere, so the bundler bails pointing at the missing artifact.","triggerScenarios":"Thrown at packages/cli/src/bundler/linux.rs:462 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The APK was not produced. Run the gradle assemble task successfully first and check its output."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}