Android: rename the app package name
Follow below steps to rename your Android package name
- 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!
- If you enjoyed this, please follow me on Medium
- Buy me a coffee
Follow me on:
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