You can change the domain by following these steps. In your example, you are trying to change the domain name com.example to com.example1 . Therefore, your package name should look like com.example.application_name .
- Right-click the package name in the project explorer and select
Refactor -> Move . - A new popup will ask you which refactor you need to make. In this, select the first
Move package 'com.example.application_name' to another package. and then click ok . - A new warning window will show that the package is in several places. Click
yes on this warning. - A new dialog box will open. In this case, change the
To package value to the new domain name com.example1 , and then check the box for Search in comments and String and Search for text occurrences , and then click Refactor . A new dialog box will now open and ask for confirmation to create a new package. Click yes . - In the bottom window, he will search for everything named
com.example and ask you to reorganize. Click Do Refactor . It. You renamed the domain name from com.example to com.example1 . The previous package will not be deleted. if you do not want it, it means that you can delete it.
Mahendran sakkarai
source share