Search code examples
androidandroid-studiokotlinandroid-mediaplayer

Changing Android Package Name - UAMP


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?


Solution

  • 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.