Web build

Capacitor: Invalid App ID

Capacitor rejected the appId

Capacitor: Invalid App ID. The appId also has to be a valid Android package name: letters and numbers, dots between parts, no hyphens.

Updated

What this error means

The appId also has to be a valid Android package name: letters and numbers, dots between parts, no hyphens.

Why it happens

Capacitor checks the appId as an Android package name before it writes the native projects. Hyphens and other illegal characters fail that check.

The message tools print

[error] Invalid App ID "com.my-studio.harbor". Must be in Java package form with no dashes (ex: com.example.app)

How to fix it

  1. Change appId in capacitor.config to something like com.studio.myapp.
  2. Check it with the appId validator before you create store records — it’s permanent after that.

The Capacitor appId and bundle ID validator checks the appId and webDir before you create store records.

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 Web build errors

Build the web app before the native one

CapWrapp installs dependencies from the lockfile, builds the site, and runs Capacitor sync before the native build, from the GitHub repo you connect.

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