skip to Main Content

I followed the steps to sign bundle for my Flutter app.

Than I dragged build/app/outputs/bundle/release/app-release.aab to Google Play console’s app bundles, and got error You need to use a different package name because "com.example" is restricted.

I searched for "com.example" in my project folder, but did not find anything.

Where can I update the package name?

error

3

Answers


  1. android -> app -> build.gradleenter image description here

    make sure when using any package name you need to change

    example

    , because Google not support example keword so instead of example give any name like

    "com.bijoy.bijoyx"
    
    Login or Signup to reply.
  2. add this :

    dependencies:
      change_app_package_name: ^1.1.0
    

    then in the terminal write this :

    flutter pub run change_app_package_name:main com.new.package.name
    

    change com.new.package.name with your name

    Login or Signup to reply.
  3. To change package name in android you need to use this command in your terminal

    flutter pub global activate rename
    

    then

    flutter pub global run rename --bundleId com.example.android.app
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search