Application ID

applicationId (Required)

applicationId is the main domain of your application. The applicationId is not related to the package name, although some application developers name the applicationId and the package name the same.

Each application to be published must have a unique domain name, generally using 3 word arrangements (can be more than 3), for example: com.app.yourappname, com is identified as the domain, app as the name of the developer and yourappname as the name of the application.

  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 finishe

  2. Select File > Invalidate Caches.. > Invalidate and Restart

Last updated