Skip to main content

Android Application ID

applicationId (Required)

applicationId is the main unique identifier of your application. The applicationId is not related to the package name, application Id can different or same with package name.

In an Android project, the applicationId refers to a unique identifier for your Android application package. This identifier is used to distinguish your app from others and is essential for various purposes, including app installation, updating, and compatibility checks.
Generally using 3 word arrangements (can be more than 3 or less than 3), for example: com.app.markeet, or app.dreamspace.markeet

  1. Open Gradle Scripts > build.gradle (Module: app)
  2. Change the application ID with your own id name
  3. Click Sync Now.
  4. Change the id as unique as possible, because application id is very important used if you want to publish the application to the google play.

Important : your applicationId must be the same as the Android package name you created in the firebase console when you created google-services.json



Package name and namespace (optional)

Package name is the folder path to store class files. The package name is not required to be changed, so it uses the default source code. But we recommend changing it according to the applicationId structure, if you want to change it:
  1. Click the settings icon in Android Studio
  2. Select Tree Appearance, remove the checklist in the Compact Middle Packages section
  3. Select one of the sub packages then right click > Refactor > Rename...
  4. When finished, return the checklist to Compact Middle Packages so that the package name structure looks neater again
Important: the structure of the package name must be the same as the namespace in the build.gradle file, otherwise the project will be error




Invalidate caches

After the renaming of the package name is complete, you need to rebuild the project and invalidate the cache
  1. Select Build > Rebuild Project and wait until the building project finished
  2. Select File > Invalidate Caches.. > Invalidate and Restart

Comments