Assets & configuration

The Android package name guide

The one decision you cannot undo. What the rules are, why reverse-domain naming exists, and what actually happens if you pick badly.

6 min read Updated September 2026

Almost everything about an Android app can be changed after release. The name, the icon, the description, the price, the code — all of it. The package name cannot. It is the app's identity as far as Android and Google Play are concerned, and it is fixed from your first upload until the listing is deleted.

What it is used for

The syntax rules

RuleFailsWorks
At least two segmentsmyappcom.myapp
Lowercasecom.MyAppcom.myapp
Segments start with a lettercom.7studio.appcom.studio7.app
No hyphens or spacescom.my-app.shopcom.myapp.shop
No Java keywordscom.new.appcom.newapp.app
Not the sample prefixcom.example.shopcom.yourdomain.shop

The first five are enforced by the compiler; the last by Google Play, and it accounts for a surprising share of first-upload rejections.

Package Name GeneratorBuild and validate a valid applicationId Open the tool
The package name generator producing com.example.myshop from a domain and app name, with a Gradle snippet
Reverse the domain, append the app, and confirm it compiles before you build.

Why reverse domain naming

example.com becomes com.example. The convention comes from Java packages and exists for one reason: collision avoidance. Because you control the domain, nobody else will legitimately claim that prefix, so two unrelated developers cannot both ship com.example.shop.

Nothing verifies it. No DNS lookup happens, and the app is not hosted at that domain. It is a social contract that works because everyone follows it — which is also why inventing a domain you do not own is a bad idea: if someone later registers it and publishes, you have a conflict you cannot win.

No domain? io.github.yourusername.appname borrows the uniqueness of your GitHub account and is widely accepted.

What happens when it is wrong

The validator catches syntax problems instantly, which is worth doing before a five-minute build rather than after.

The validator rejecting com.example.my-shop with an explanation of the invalid segment
Hyphens are legal in domains and never legal in package names — an easy trap.

The expensive mistake is not a syntax error, though. It is publishing under a name you later regret. Because the package name is permanent, changing it means:

Choosing one you will still like

applicationId vs namespace

Modern Gradle separates two things that used to be one. namespace is the Kotlin/Java package your source and generated R class live in. applicationId is the identity Android and Play use. They are usually identical:

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

Keeping them separate is useful for one trick: giving debug builds a suffix (com.acme.shop.debug) so a development build installs alongside the release one instead of replacing it. When someone asks for your app's package name, they mean the applicationId.

Questions people ask

Can I change my package name after publishing?

No. On Google Play it is the permanent identity of the listing. Changing it means a new listing with no installs, ratings or reviews, and existing users are not migrated — they would have to find and install the new app themselves.

What if I do not own a domain?

Use io.github.yourusername.appname. It inherits the uniqueness of your GitHub account and is a widely recognised convention. Avoid inventing a company domain you do not control.

Why is com.example rejected?

That prefix is reserved for documentation and sample code, so Google Play blocks uploads that use it. It is one of the most common rejections for a first release.

Does the package name have to match my website?

No — nothing checks it, and the app is not served from that domain. The convention exists purely to prevent two developers choosing the same identifier.

Can two apps share a package name?

No. It is globally unique on Google Play and unique per device, which is exactly what makes it usable as an identity. Once a name has been published it is permanently taken.

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