quasarframework/quasar · warning

As an alternative, you can use the "--ide" param and build f

Error message

As an alternative, you can use the "--ide" param and build from the IDE.

What it means

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.

Source

Thrown at app-vite/lib/modes/capacitor/capacitor-builder.js:142

      'android/app/build/outputs'
    )

    // Remove old build output
    fse.removeSync(buildPath)

    log('Building Android app...')

    await spawnSync(
      `./gradlew${process.platform === 'win32' ? '.bat' : ''}`,
      [
        `assemble${this.quasarConf.metaConf.debugging ? 'Debug' : 'Release'}`,
        ...this.argv._
      ],
      { cwd: this.ctx.appPaths.resolve.capacitor('android') },
      () => {
        warn()
        warn('Gradle build failed!')
        warn(
          'As an alternative, you can use the "--ide" param and build from the IDE.'
        )
        warn()
      }
    )

    fse.copySync(buildPath, this.#packagedDir)
  }
}

View on GitHub (pinned to 4841521b5f)

Solutions

  1. 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.
  2. Check that ANDROID_HOME/ANDROID_SDK_ROOT point to a valid SDK and a compatible JDK is installed (java -version).
  3. Open the generated android/ project in Android Studio, run the build there, and fix the reported Gradle/compile error.
  4. Ensure native plugin dependencies are installed: cd src-capacitor && npm install, then npx cap sync android.

Example fix

// before
quasar build -m capacitor -T android
// after (interactive/IDE fallback)
quasar build -m capacitor -T android --ide
Defensive patterns

Strategy: fallback

Validate before calling

// before building Android via CLI
const { execSync } = require('child_process');
execSync('java -version', { stdio: 'inherit' }); // ensure JDK present
if (!process.env.ANDROID_HOME) throw new Error('ANDROID_HOME not set — Gradle build will fail');

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30). Data as JSON: /api/errors/78d1bf1db95e9c40. Report an issue: GitHub.