0

I am using the UAMP-Example provided by Android on GitHub.

The Uamp-Project has been optimized by myself and now i would like to change the com.example.android.uamp (and all corresponding files for Android Auto too) to my custom ch.test.appname.

I tried to change soo many files but got dozens of 'file not found' Errors.

Which files to i have to change?

3 Answers3

1

Try to make use of the built in Rename functionality of Android Studio to rename your package. First change your project scope from Android to Project:

enter image description here

Then navigate into the java folder and select your package (e.g. com.example.test)

Right click -> Refactor -> Rename

Click Rename Package

Type in your new package name and all dependencies should update automatically.

J. Hegg
  • 1,365
  • 11
  • 31
0

To change your package name follow the below steps: First click below mark icon -> enter image description here

Then You see a window like below and click the mark selection area -> enter image description here

Then you will see your package name is divided by part wise like com/nayan/myapp like below image -> enter image description here

Then click the Right button on any part which you want to change The Select Refactor -> Rename and then click Package name. Change your package name and click ok.

After that you should change your package name manually from your build.gradle(Module) Also check your manifest file if the manifest package name is not changed change it manually. That's it.

Nayan Sarder
  • 512
  • 1
  • 3
  • 18
0

Using Nayan Sarder's answer solved my Problem. But i had to open the whole project in VisualStudio-Code and had to change com.example.abc.appname... to ch.example.abc.appname manually.

Thank's Nayan!