Android app ApplicationId, versionName and versionCode explained

So what’s an Application ID?

Each app has a unique id which looks something like this com.example.myApp. No two apps can have the same id.

The application id matches the Java-style package name that you used when you created a new project in Android Studio.

The application id identifies the app on a device as well as in the Google Play store. Never change the app id once you have published the app in the play store.

Can I change the application id and package name?

Once you have finished setting up your project in Android Studio, the application id and package name are independent of each other and you can change either without affecting the other.

Why would I want to change the application id?

You may want to change your app’s application id:

For different build variants – for example, you may have a free and a pay version of the same app. They each will need a unique id when you publish them in the app store

For testing – it’s not necessary but you can change the app’s id for testing if you wish

Be aware though that you should not change your application id once you have published your app.

Can I change the package name?

Yes you can.

The package name matches the application id by default but you can change it.

Be aware that the package name should always match the package attribute as depicted in the AndroidManifest.xml file.

Use Android Studio’s tools to rename and refactor your packages so that the package name and package attribute will automatically be synced for you.

Although you can have a different name for the manifest package attribute and the applicationId, Android Studio uses the applicationId in the final build and copies it to the final APK’s manifest package attribute.

The Google Play Store and the Android platform both look at the AndroidManifest.xmlpackage attribute to identify your app.