@Vadimych1
Просто я.

Flutter: Execution failed for task ':app:mergeReleaseResources'. Что это?

Здравствуйте. Пишу приложение под Android на Flutter. Пришло время заменить иконки. Зашел на сайт, создал все нужные ассеты. Закинул в папку, по инструкции. После этого сразу захотел сделать build, но вылезает ошибка:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR:D:\BIG_CHALLENGES\2023-2024\App\travel_manager_new\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: AAPT: error: file failed to compile.

   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR:D:\BIG_CHALLENGES\2023-2024\App\travel_manager_new\android\app\src\main\res\mipmap-hdpi\ic_launcher.png: AAPT: error: file failed to compile.

   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR:D:\BIG_CHALLENGES\2023-2024\App\travel_manager_new\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png: AAPT: error: file failed to compile.

   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR:D:\BIG_CHALLENGES\2023-2024\App\travel_manager_new\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: AAPT: error: file failed to compile.

   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR:D:\BIG_CHALLENGES\2023-2024\App\travel_manager_new\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png: AAPT: error: file failed to compile.


Папки:
653d021561d7c419015266.png

Подскажите, что делать?
  • Вопрос задан
  • 152 просмотра
Решения вопроса 1
@Vadimych1 Автор вопроса
Просто я.
Решил проблему следующим способом:
1. Удалил все изменения
2. flutter clean
3. flutter create .
4. В pubspec.yaml добавил
dev_dependencies:
       flutter_launcher_icons: ^0.13.1

5. Запустил flutter pub run flutter_launcher_icons (в pubspec.yaml написал настройку для него:
flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "path/to/icon"
)
Плагин все сделал сам.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы