简体   繁体   中英

you already have an app with that package name

I need help with flutter and firebase package name

I'm trying to add 3 android apps that are using the same backend server to firebase, I have managed to add 1 app and when I try to add the second one I'm getting this notification “ you already have an app with that package name” that is in firebase.

how do i go about it?

with the solutions I have found, I have to rename the 2nd and 3rd package name, but I don't seem to understand why I should that or the concept behind it.

You need to use a different package name "com...XXX" in every project it's like your app's unique id. you can change app name by following this steps

Step 1

Go to file android/app/buil.gradle in your flutter project

android{
  //make sure every project has different application ID
  defaultConfig {
        applicationId "com.example.xyz" //change here               
    }
}

Step 2:

run commands

flutter clean

flutter pub get

flutter run

Step 3

Remove your old project from firebase and reconnect your new name project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM