DEV Community

Cover image for Package Name Already Exists in Google Play: How to Fix It
vmzavas
vmzavas

Posted on

Package Name Already Exists in Google Play: How to Fix It

"You need to use a different package name because com.example.app already exists in Google Play." Play Console shows this the moment you upload a bundle to a new app, before any testing starts. Nothing is wrong with your code. Google Play treats the package name, the applicationId in your build, as a unique ID for one app, and some app entry already holds yours.

This usually happens on day zero, before closed testing has even started, so it is worth fixing properly now. A package name can't be renamed later without starting over as a new app.

Why Google Play says the package name already exists
Every app on Google Play is identified by its package name. Once an app entry uses a name, no other entry can upload a bundle with it. That includes entries in your own account, unpublished drafts that already received a bundle, and apps by other developers you will never see in search.

The most common causes are simple. You kept a template name like com.example.myapp, which someone uploaded long ago. You followed a tutorial and kept its package name. You created a second app entry in Play Console by mistake, and the first one already has your bundle. Or you are trying to reuse the name of an app you deleted.

Whose package name is it? Four cases
Open All apps in Play Console and look for an entry with the same package name first. If you find it, that is your app. Don't fight the error: upload the bundle to that existing entry and delete the empty duplicate you just created.

If the name isn't in your account, another developer holds it. You can't take it over, so pick a new package name and rebuild.

If you deleted an app that used the name, Google's Delete an app help page decides the outcome. For a deleted app with zero lifetime installs, the package name is freed for reuse by anyone. For a deleted app with any lifetime installs, the name can't be reused by any other app, including other apps in your own account. Closed testers count as installs, so an old test app that a few people installed has burned its name.

The same page says you can recover a deleted app within seven days. If you only want the old name back, recovering the app is often easier than creating a new one.

Four cases for the package name already exists error: another app in your own account, an app in another developer account, your deleted app with zero installs, your deleted app that had installs, each with its fix
Find who holds the name first. The fix depends on it.
How to change the package name (applicationId)
When you need a new name, change it in one place in your project, rebuild the .aab and upload it to a new app entry in Play Console. In Android Studio and Flutter that is applicationId inside defaultConfig in the app module's build.gradle or build.gradle.kts. In Expo it is android.package in app.json or app.config.js. In Unity it is Package Name under Player Settings, Other Settings. In Godot it is Unique Name in the Android export preset.

Choose a reverse domain name you control, like com.yourname.appname, and avoid generic words that others are likely to have used. In Android Studio you don't have to rename your Kotlin or Java packages. The applicationId is what Google Play checks. If you use Firebase, Google sign-in or similar services, register the new package name there too, or those features will fail on testers' phones.

Where the package name lives in Android Studio, Flutter, Expo, Unity and Godot, with the exact setting to change in each
One setting per tool. Change it, rebuild, upload to a new app entry.
The mirror error: "needs to have the package name"
The opposite message, "Your APK or Android App Bundle needs to have the package name" followed by a name, appears when you upload to an existing app entry with a different package name. The entry is locked to the name of its first bundle. Here the fix is the reverse: set your applicationId back to the name the app already uses, or create a new app entry if you really meant to change it.

What a new package name means for closed testing
To Google Play, a new package name is a new app. If you change it after your closed test has started, the new app needs its own closed test, its own testers and its own 14 days. Testers who installed the old one have to opt in to the new one too.

So settle the package name before you invite anyone. Check that your first upload goes through, then add your tester list or Google Group and share the opt-in link. If you still need people for the test, PeerPlay is a free Android app where developers test each other's apps, so you can find your 12 testers while you test theirs.

Top comments (0)