Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

change package name flutter

flutter pub run change_app_package_name:main com.package.appname
Comment

change package name flutter

pub global run rename --bundleId com.example.android.app --target android
Comment

flutter change package name

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

change package name flutter

flutter create --org com.yourdomain appname
Comment

change flutter package name

//fisrt add this to dependency
dev_dependencies: 
  change_app_package_name: ^1.1.0

//then run this on terminal
flutter pub get

//then to change now
flutter pub run change_app_package_name:main com.new.package.name
Comment

rename android package name in flutter

For Android App Name

Change the label name in your AndroidManifest.xml file:

 <application
    android:name="io.flutter.app.FlutterApplication"
    android:label="TheNameOfYourApp"   
For Package Name

Change the package name in your AndroidManifest.xml (in 3 of them, folders: main, debug and profile, according what environment you want to deploy) file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your.package.name">
Also in your build.gradle file inside app folder

defaultConfig {
    applicationId "your.package.name"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Finally, change the package in your MainActivity.java class (if the MainActivity.java is not available, check the MainActivity.kt)

    package your.package.name;

    import android.os.Bundle;
    import io.flutter.app.FlutterActivity;
    import io.flutter.plugins.GeneratedPluginRegistrant;
    public class MainActivity extends FlutterActivity {
Change the directory name:

From:

  androidappsrcmainjavacomexample
ame
To:

  androidappsrcmainjavayourpackage
ame
  
EDITED : 27-Dec-18

for package name just change in build build.gradle only

defaultConfig {
    applicationId "your.package.name"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
For iOS

Change the bundle identifier from your Info.plist file inside your ios/Runner directory.

<key>CFBundleIdentifier</key>
<string>com.your.packagename</string>
UPDATE

To avoid renaming the package and bundle identifier, you can start your project using this command in your terminal:

flutter create --org com.yourdomain appname
Comment

how to change the package name in flutter

Go to build.gradle in app module and rename applicationId "com.company.name"

Go to Manifest.xml in app/src/main and rename package="com.company.name" and android:label="App Name"

Go to Manifest.xml in app/src/debug and rename package="com.company.name"

Go to Manifest.xml in app/src/profile and rename package="com.company.name"

Go to app/src/main/kotlin/com/something/something/MainActivity.kt and rename package="com.company.name"
Comment

PREVIOUS NEXT
Code Example
Shell :: install angular cdk 
Shell :: restart nginx in mac 
Shell :: Error: ENOSPC: System limit for number of file watchers reached, 
Shell :: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted 
Shell :: stop localhost server 
Shell :: git rename remote 
Shell :: arch linux remove nodejs 
Shell :: unix print environment variable 
Shell :: linux get host ip local 
Shell :: remove root permission from folder 
Shell :: show all remote branches git 
Shell :: raspberry add-apt-repository command not found 
Shell :: check what ports are open linux 
Shell :: auto clean ubuntu 
Shell :: install hugo on ubuntu 
Shell :: bash view the contents of a sqfs file 
Shell :: vs code always says rebasing git 
Shell :: how to change timezone in linux 
Shell :: remove large file from git history 
Shell :: make zsh for all users 
Shell :: mongodb view users 
Shell :: install hashcat for kali linux 
Shell :: nx run storybook 
Shell :: ssh end connection after executing script 
Shell :: Build Blender git commands 
Shell :: how to create a gui in powershell grepper 
Shell :: number fo files prestn in gcs bucket command 
Shell :: textbox should accept only numbers till 10 digit using angular 
Shell :: apply stash 
Shell :: libdnet 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =