Android essentials

Android package name rules, explained

The only setting you can never change. The syntax Gradle enforces, the prefix Play bans, why reverse-domain naming exists, and what a bad choice actually costs.

5 min read Updated September 2026

Quick answer: a package name (applicationId) is a lowercase, dot-separated identifier such as com.yourbrand.shop with at least two segments, each starting with a letter, no hyphens, no Java keywords, and never the com.example prefix. It identifies your app to Android and Google Play and cannot be changed after the first publish.

What depends on it

The syntax

RuleRejectedAccepted
Two or more segmentsshopcom.shop
Lowercasecom.MyShopcom.myshop
Each segment starts with a lettercom.3dprint.appcom.print3d.app
Letters, digits, underscores onlycom.my-shop.appcom.myshop.app
No Java keywordscom.new.appcom.newapp.app
Not the sample prefixcom.example.shopcom.yourbrand.shop

Gradle enforces the first five. Google Play enforces the last, and it is one of the commonest reasons a first upload bounces.

Package Name GeneratorBuild and validate a valid applicationId Open the tool
The package name generator building com.example.myshop from a domain and an app name, with the Gradle line
Reverse the domain, add the app, and validate it before the build rather than after.

Why the domain is backwards

yourbrand.com becomes com.yourbrand. The habit comes from Java packages and exists to prevent collisions: you control the domain, so nobody else can honestly claim the prefix, so two developers cannot both publish com.yourbrand.shop.

Nothing checks it. No DNS lookup, no hosting requirement — it is a convention that works because it is followed. That is also why inventing a domain you do not own is risky: if someone registers it later and publishes, the conflict is theirs to win.

No domain at all? io.github.yourhandle.appname borrows the uniqueness of a GitHub account and is widely used.

When it is wrong

Syntax errors are cheap — a validator catches them before a build starts.

The generator rejecting com.example.my-shop and explaining which segment is invalid
Hyphens are fine in domains and never fine in package names.

The expensive error is publishing under a name you later regret, because changing it means:

Choosing well

applicationId vs namespace

Modern Gradle splits two ideas that used to be one. namespace is the Kotlin/Java package your source and the generated R class live in; applicationId is the identity Android and Play use. Usually they match:

android {
    namespace = "com.acme.shop"
    defaultConfig {
        applicationId = "com.acme.shop"
    }
}

The split is useful for one trick: a .debug suffix on the applicationId lets a development build sit beside the release build instead of replacing it. When anyone asks for your "package name", they mean the applicationId.

Questions people ask

Can a package name be changed after publishing?

No. On Google Play it is the listing's permanent identity. A new name means a new listing with no installs, ratings or reviews, and existing users are not moved over.

What if I have no domain?

Use io.github.yourhandle.appname, which borrows the uniqueness of your GitHub account. Do not invent a company domain you do not control.

Why does Play reject com.example?

That prefix is reserved for documentation and samples, so Play blocks it. It is one of the most frequent first-upload rejections.

Must the package name match my website?

No. Nothing verifies it and the app is not served from that domain. The convention exists only to keep identifiers unique.

Can two apps share one package name?

No. It is globally unique on Google Play and unique on each device — that uniqueness is what makes it usable as an identity.

Read next

Ready to turn your site into an app?

Upload an HTML file or a ZIP, set your icon and name, and download a signed Android app. No Android Studio, no command line.

Open the builder