skip to Main Content

So I want to connect two of my apps to firebase and i can’t seem to figure out how can I change my android id as by default it’s com.example.myapp for both of my apps.

I tried renaming it in build.gradle but it doesn’t seem to work or am I missing something?

2

Answers


  1. I just searched in all files for "com.example" and found these in a new IDX Flutter project:

    /home/user/myapp/android/app/src/main/kotlin/com/example/myapp/MainActivity.kt
      1,9: package com.example.myapp
    
    /home/user/myapp/android/app/build.gradle
      27,18:     namespace = "com.example.myapp"
      38,26:         applicationId = "com.example.myapp"
    

    I presume if you edit those to your desired ID, if would suffice.

    Login or Signup to reply.
  2. You can use the package change_app_package_name: ^1.3.0 to change your app’s package name. Add this package to your pubspec.yaml, then run the command dart run change_app_package_name:main com.your_package_name. It will automatically update your package name everywhere.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search