Say I've created a project like flutter create --org com.myproject project
.
Is there a command to run to change the organization in the already created project in all the areas it is specified?
Thus perhaps a command with a different org changes all the org name in their respective places when called within the project.
flutter update --org com.yourproject
If you have already created a project you can use change_app_package_name package to change the package name. 'flutter create --org com. yourcompany --project-name new_app_name . ' (add the period if you are inside the existing project -- you should trash the android and ios folders first to have them regenerated).
I don't think there is a way to do this. Instead you can do this manually by editing the following:-
android/app/build.gradle
In android { defaultConfig {} }
the property named applicationId
AndroidManifest.xml
filesUpdate package
property in all your AndroidManifest.xml
files, i.e. /android/app/src/main
, /android/app/src/debug
, /android/app/src/profile
.
If you see /android/app/src/main/[kotlin or java]
, you will find nested directories com
then example
and then [appName]
by default. It resembles the application ID so change the directory names.
/android/app/src/main/[java or kotlin]/[by default com/example/[applicationName]]/[MainActivity.kt || MainActivity.java]
In this file at the first some lines you will find your applicationID. Change it.
Then run flutter clean && flutter run
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With