facebook twitter hatena line email

Flutter/アプリアイコン変更

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

公式

https://pub.dev/packages/flutter_launcher_icons#-installing-tab-

アプリのアイコンを変更

pubspec.yml

dev_dependencies: 
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.7.4
flutter packages get

アイコン画像を設定

flutter_icons:をpubspec.ymlへインデント無しで記述する

pubspec.yml

dev_dependencies:

flutter_icons:
  android: true 
  ios: true
  image_path: "assets/icon/icon_512x512.png"

アプリのアイコンの変更適用実行

$ flutter pub run flutter_launcher_icons:main

InvalidConfigExceptionエラーが出るとき

エラー詳細

✗ ERROR: InvalidConfigException
Cannot not find minSdk from android/app/build.gradle

対応方法

android/app/build.gradle

-flutter.minSdkVersion
+flutter.minSdkVersion=21

ipaのアップロード時の"ERROR ITMS-90717:Invalid App Store Icon. The App Store Icon in the asset catalog in 'Runner.app' can't be transparent nor contain an alpha channel."エラー

画像の透明(アルファ)設定が入ってるので、画像エディッタからアルファの設定を削除

参考

https://qiita.com/k-nasa/items/33426af4d396b581c101