Android build

:capacitor-android project could not be found

The Android project was never synced

:capacitor-android project could not be found. android/ points at Capacitor’s Gradle modules, but they aren’t there: npx cap sync didn’t run after installing packages.

Updated

What this error means

android/ points at Capacitor’s Gradle modules, but they aren’t there: npx cap sync didn’t run after installing packages.

Why it happens

The Android app’s Gradle file depends on Capacitor modules that npx cap sync writes. Those folders are missing, so Gradle cannot evaluate the project.

The message tools print

A problem occurred evaluating project ':app'.
> Project with path ':capacitor-android' could not be found in project ':app'.

How to fix it

  1. Run npm install, then npm run build, then npx cap sync android.
  2. On CI, keep that order before Gradle runs.

Check a log that shows this

Paste the failing step into the build error explainer. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

Other Android build errors

Let the Android build run in CI

CapWrapp builds the release on GitHub Actions with the JDK and Android SDK the project needs, and signs it with the upload keystore it stores for you.

  • Free to start
  • No credit card
  • Sign in with Google or GitHub