The package name of an Android app uniquely identifies your app on the device Play Store.
Open Gradle Scripts → app/build.gradle
Change the application ID with your own id name
Standard naming procedure : com.company.appname
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.
Important : your applicationId must will use to generate google-services.json on firebase console configuration
This step is optional, because unique id for app identifier already configure at Step 1 above, you can go without change package folder name, but if you want to change id here the step
Click once on your package and then click setting icon on Android Studio.
Close / Unselect Compact Empty Middle Packages
Right click your package and rename it.