I Was Created an android application with package name of com.example.******.sample . I need to refactor the package name into org.newOrg.*******.sa
In Android Studio, you can do this by following these 4 steps:
1) Click on the little gear icon on Project Pane
2) Uncheck the Compact Empty Middle Packages option
3) Now you can rename each package by right-click & then refactor it, remember to select Rename Package on popup rather Rename Directory
4) Update the package in build.gradle
5) And update google-services.json is you are using it (i.e. FireBase).