Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter App is not working after changing package name

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.

like image 814
Darwish Al-Neyadi Avatar asked Sep 11 '18 19:09

Darwish Al-Neyadi


People also ask

How do you fix you need to use a different package name because COM example is restricted?

The package name is the identitiy of the application. To rename the package name, In eclipse right click on the project in project explorer. Then Android Tools > rename Aplication Package name. Then enter the new package name.

How do you get the package name in Flutter?

PackageInfo packageInfo = await PackageInfo. fromPlatform(); Now by using packageInfo object, you can easily get appName, packageName, AppVersion & app build number.


1 Answers

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

like image 72
Jan D.M. Avatar answered Oct 27 '22 00:10

Jan D.M.