Flutter App is not working after changing package

2020-07-03 05:34发布

问题:

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.

回答1:

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