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
- Open Gradle Scripts > build.gradle (Module: app)
- Change the application ID with your own id name
- Click Sync Now.
- 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.
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:
- Click the settings icon in Android Studio
- Select Tree Appearance, remove the checklist in the Compact Middle Packages section
- Select one of the sub packages then right click > Refactor > Rename...
- When finished, return the checklist to Compact Middle Packages so that the package name structure looks neater again
After the renaming of the package name is complete, you need to rebuild the project and invalidate the cache
- Select Build > Rebuild Project and wait until the building project finished
- Select File > Invalidate Caches.. > Invalidate and Restart