1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Flutter]一番簡単にパッケージ名を変更する方法[Android]

Last updated at Posted at 2020-09-14

#方法
Change App Package Name for Flutterを使用する。

まず、"pubspec.yaml"に"change_app_package_name"を追加。

pubspec.yaml
dependencies: 
  change_app_package_name: ^0.1.2

pub getを行い、dependenciesをアップデートする。

flutter pub get

以下のコマンドを実行。
( [com.new.package.name]に新しいパッケージ名を入れる。)

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

以下のファイルにおいて、変更がいい感じに自動で行われます。

  • AndroidManifest.xml (release, debug & profile用)
  • build.gradleファイル
  • MainActivityファイル (java と kotlinの両方対応)
  • MainActivityファイルを新しいディレクトリに移動
  • 古いディレクトリを削除
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?