I Was Created an android application with package name of com.example.******.sample . I need to refactor the package name into org.newOrg.*******.sa
click on Settings in the project window uncheck the Compact Empty Middle Packages
Compact Empty Middle Packages
It will separate the app package and you can rename it one after another.Also change the App Id inside build.gradle under defaultConfig section
defaultConfig { applicationId "com.foocomp.android" }