Flutter App is not working after changing package name

13,577

You also need to update your package name in: Mainactivity.java

Update: If you have enabled Kotlin, you should update your package name in Mainactivity.kt

Share:
13,577
Darwish Al-Neyadi
Author by

Darwish Al-Neyadi

Updated on December 06, 2022

Comments

  • Darwish Al-Neyadi
    Darwish Al-Neyadi over 1 year

    I am trying to release my apk and just changed the com.example package name to my own com.[companynamehere].[appname] in the AndroidManifest.xml file and app/build.gradle file, however now my app stops working as soon as i run it. any idea what might be the problem? is there anywhere else i need to change the package name? I'm also using firebase and i generated a new google-services.json file with the new package name.

  • Eric Duffett
    Eric Duffett about 5 years
    I had enabled Kotlin in my project so my update was made in Mainactivity.kt. Thanks! This was hugely helpful!!
  • Daniel Eberl
    Daniel Eberl over 4 years
    You saved me hours I guess. Thank you.
  • John Joe
    John Joe about 4 years
    saved my day !!
  • Dheeraj Sarwaiya
    Dheeraj Sarwaiya about 4 years
    after wasting hours, this saved me
  • William Romero
    William Romero over 3 years
    Thank you for this response! You saved my day.
  • HJo
    HJo about 2 years
    Good lord I don't know how I would have solved this without this comment