Computer >> Computer tutorials >  >> Programming >> Android

How to change package name in android?


Here are the simple steps to change the package name in android .

Click on your pack name(in source tree). -> Right Click --> Refractor -> Rename as shown below -

How to change package name in android?

Click on rename, it will show pop up as shown below -

How to change package name in android?

Click on Rename package, it will show new pop up as shown below -

How to change package name in android?

Now change the name as per requirement and click on refractor as shown below -

How to change package name in android?

Now it will check all files and asks for refractor as shown below -

How to change package name in android?

In the below of Android studio, there is "do Refractor button". click on it. Now open your build.gradle as shown below -

How to change package name in android?

Still, it will show old package name, rename to new package name as shown below -

How to change package name in android?

now clean your package and rebuild that's it.