Android: rename the app package name

Andres Sandoval
2 min readAug 16, 2024

Follow below steps to rename your Android package name

  1. Go to the file build.gradle(App) change the app name:
android {
namespace = "com.newName"
compileSdk = 34

defaultConfig {
applicationId = "com.newName"
minSdk = 31
}

...
}

2. Change folder to Android. Click on the three dots symbol(gear)

Go to Tree appearance -> uncheck “Compact Middle Packages”

3. Click on the folder outside of “com” and change the name, ex: “newName”

4. Build and run app.

Thank you for reading. Hope you learn something new.🙌🙏✌.

Don’t forget to clap 👏 50 times to support me and follow me for more such useful articles about Android Development, Gemini AI, Kotlin & KMP.

If you need any help related to Android, Kotlin and KMP. I’m always happy to help you.

[Hopefully you will find this useful]

Thank you for reading!

Follow me on:

Medium, LinkedIn, GitHub

Thank you for taking the time to read this. I welcome your feedback on how I can improve or if you have any questions.

— Andres 🙌🏻

References

https://medium.com/@shashamaurya/a-step-by-step-guide-to-changing-the-package-name-of-your-android-kotlin-project-d60fe00a536c

--

--