{"record":{"id":"78d1bf1db95e9c40","repo":"quasarframework/quasar","slug":"as-an-alternative-you-can-use-the-ide-param-a","errorCode":null,"errorMessage":"As an alternative, you can use the \"--ide\" param and build from the IDE.","messagePattern":"As an alternative, you can use the \"--ide\" param and build from the IDE\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/modes/capacitor/capacitor-builder.js","lineNumber":142,"sourceCode":"      'android/app/build/outputs'\n    )\n\n    // Remove old build output\n    fse.removeSync(buildPath)\n\n    log('Building Android app...')\n\n    await spawnSync(\n      `./gradlew${process.platform === 'win32' ? '.bat' : ''}`,\n      [\n        `assemble${this.quasarConf.metaConf.debugging ? 'Debug' : 'Release'}`,\n        ...this.argv._\n      ],\n      { cwd: this.ctx.appPaths.resolve.capacitor('android') },\n      () => {\n        warn()\n        warn('Gradle build failed!')\n        warn(\n          'As an alternative, you can use the \"--ide\" param and build from the IDE.'\n        )\n        warn()\n      }\n    )\n\n    fse.copySync(buildPath, this.#packagedDir)\n  }\n}\n","sourceCodeStart":124,"sourceCodeEnd":152,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/modes/capacitor/capacitor-builder.js#L124-L152","documentation":"Quasar's Capacitor build mode runs the Gradle build for Android via the capacitor CLI. When that Gradle process exits non-zero, this warning is emitted telling you the automated build failed and suggesting you open and build the project in Android Studio instead using quasar's --ide flag.","triggerScenarios":"Running `quasar build -m capacitor -T android` (via #buildAndroid in capacitor-builder.js #packageFiles) when the spawned `capacitor build android`/Gradle command fails: compile errors in the Android project, missing Android SDK/NDK, wrong JAVA_HOME, or corrupted gradle wrapper.","commonSituations":"Android SDK not installed or ANDROID_HOME unset; JDK version mismatch (Gradle needs a specific JDK); custom native plugin code with compile errors; first build missing license agreements; running on a machine without Gradle-compatible tooling.","solutions":["Re-run the build with the --ide flag (quasar build -m capacitor -T android --ide) and build/run from Android Studio to see the real Gradle error.","Check that ANDROID_HOME/ANDROID_SDK_ROOT point to a valid SDK and a compatible JDK is installed (java -version).","Open the generated android/ project in Android Studio, run the build there, and fix the reported Gradle/compile error.","Ensure native plugin dependencies are installed: cd src-capacitor && npm install, then npx cap sync android."],"exampleFix":"// before\nquasar build -m capacitor -T android\n// after (interactive/IDE fallback)\nquasar build -m capacitor -T android --ide","handlingStrategy":"fallback","validationCode":"// before building Android via CLI\nconst { execSync } = require('child_process');\nexecSync('java -version', { stdio: 'inherit' }); // ensure JDK present\nif (!process.env.ANDROID_HOME) throw new Error('ANDROID_HOME not set — Gradle build will fail');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep ANDROID_HOME, ANDROID_SDK_ROOT and JAVA_HOME set and pointing at compatible versions.","Accept Android SDK licenses (sdkmanager --licenses) on fresh machines.","When the CLI build fails, immediately retry with --ide to get Android Studio's detailed error output.","Run `npx cap sync android` after changing plugins or npm dependencies."],"tags":["capacitor","android","gradle","build"],"backgroundTag":"gradle-build-failed","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}