Изображение Android Asset Studio - какие изображения актуальны - PullRequest
0 голосов
/ 03 июля 2019

Android Студия графических ресурсов предоставляет простой способ создания значков приложений, которые выглядят частично - занимают всю доступную область, с настраиваемым фоном и т. Д. Я использовал его для создания значков приложений, которые затем использую в моем гибридном приложении Cordova / Android, как описано в этом ТА. Вкратце, то, что предлагает эта тема, удаляет старый стиль

<icon src="res/android/?dpi.png" density="?dpi" />

узлов в файле config.xml для приложения Cordova и замены их на

 <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" 
  target="/manifest/application">
  <application android:icon="@mipmap/ic_launcher" 
   android:roundIcon="@mipmap/ic_launcher_round" />
 </edit-config>
 <resource-file src="res/android/drawable/ic_launcher_background.xml" 
  target="app/src/main/res/drawable/ic_launcher_background.xml" />
 <resource-file src="res/android/mipmap-hdpi/ic_launcher.png" 
  target="app/src/main/res/mipmap-hdpi/ic_launcher.png" />
 <resource-file src="res/android/mipmap-hdpi/ic_launcher_round.png" 
  target="app/src/main/res/mipmap-hdpi/ic_launcher_round.png" />
 <resource-file src="res/android/mipmap-mdpi/ic_launcher.png" 
  target="app/src/main/res/mipmap-mdpi/ic_launcher.png" />
 <resource-file src="res/android/mipmap-mdpi/ic_launcher_round.png" 
  target="app/src/main/res/mipmap-mdpi/ic_launcher_round.png" />
 <resource-file src="res/android/mipmap-xhdpi/ic_launcher.png" 
  target="app/src/main/res/mipmap-xhdpi/ic_launcher.png" />
 <resource-file src="res/android/mipmap-xhdpi/ic_launcher_round.png" 
  target="app/src/main/res/mipmap-xhdpi/ic_launcher_round.png" />
 <resource-file src="res/android/mipmap-xxhdpi/ic_launcher.png" 
  target="app/src/main/res/mipmap-xxhdpi/ic_launcher.png" />
 <resource-file src="res/android/mipmap-xxhdpi/ic_launcher_round.png" 
  target="app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png" />
 <resource-file src="res/android/mipmap-xxxhdpi/ic_launcher.png" 
  target="app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" />
 <resource-file src="res/android/mipmap-xxxhdpi/ic_launcher_round.png" 
  target="app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png" />

Вы заметите, что в этой конфигурации используются следующие файлы

  • res/android/mipman-?????dpi/ic_launcher_round.png
  • res/android/drawable/ic_launcher_background.xml

Однако выходные данные из Android asset studio содержат несколько других файлов и папок. Например

  • рисуем-v24
  • mipman-anydpi-V26
  • mipman-? ДОИ /
  • ic_launcher.png
  • ic_launcher_background.png
  • ic_launcher_foreground.png
  • ic_launcher_round.png

Насколько я могу судить, файлы ic_launcher_fore/background и папки drawable-v24 + mipman-anydpi-v26` не используются.

Мой вопрос - почему тогда генерируются и могут ли они быть безопасно удалены из проекта.

...