Is it possible to change the domain name of a company in android studio after creating a project?

When I created the android project in android studio, I found the "Company domain name" field. I created with some name first. Now I want to change the domain name of this company. Is it possible to change? Please help me solve this problem!

+7
android
source share
2 answers

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.
+13
source share

The following thread will give you a good answer. Android Android Name Pack

+1
source share

All Articles