Menu

One Flutter app, five "package names" (and the one to leave alone)
📰

One Flutter app, five "package names" (and the one to leave alone)

DEV Community: mobile·Stacklyn Labs·7 days ago
#DHpFnPJV
#devtomobile#devto#dev#package#android
Reading 0:00
15s threshold

"Just change the package name" sounds like a one-line edit. In a Flutter project, five different things answer to that name. Four of them should change when you rename an app. One usually should not.

The five names

Name Where it lives What it does Change it?

applicationId android/app/build.gradle.kts (or build.gradle ) The ID Google Play and Android devices use to identify the app Yes

namespace Same file, android block Kotlin/Java package for generated classes like R and BuildConfig Yes, keep it equal to applicationId

MainActivity package android/app/src/main/kotlin/...…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.