title: AAPT: error: attribute android:requestLegacyExternalStorage not found
body: <p>collection error in AndroidManifest.xml</p>
  <p>AAPT: error: attribute android:requestLegacyExternalStorage not found.</p>
  <p>Although the attribute is there but it writes an error</p>
  <p>My AndroidManifest.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  
  &lt;manifest
  xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  package=&quot;android.apps&quot;&gt;
  
  &lt;uses-feature android:name=&quot;android.hardware.wifi&quot; android:required=&quot;false&quot; /&gt;
  
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.FOREGROUND_SERVICE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.REQUEST_INSTALL_PACKAGES&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
  
  &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt;
  &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;
  
  &lt;application
      android:allowBackup=&quot;true&quot;
      android:fullBackupContent=&quot;true&quot;
      android:icon=&quot;@mipmap/launcher_icon&quot;
      android:label=&quot;@string/app_name&quot;
      android:requestLegacyExternalStorage=&quot;true&quot;
      android:roundIcon=&quot;@mipmap/launcher_icon&quot;
      android:supportsRtl=&quot;true&quot;
      android:theme=&quot;@style/Theme.MaterialFiles&quot;
      tools:ignore=&quot;GoogleAppIndexingWarning,UnusedAttribute&quot;&gt;
  
      &lt;activity
          android:name=&quot;android.apps.filelist.FileListActivity&quot;
          android:label=&quot;@string/file_list_title&quot;
          android:theme=&quot;@style/Theme.MaterialFiles.TransparentStatusBar&quot;
          android:visibleToInstantApps=&quot;true&quot;
          tools:ignore=&quot;UnusedAttribute&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter tools:ignore=&quot;AppLinkUrlError&quot;&gt;
              &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;data android:mimeType=&quot;inode/directory&quot; /&gt;
              &lt;data android:mimeType=&quot;resource/folder&quot; /&gt;
              &lt;data android:mimeType=&quot;vnd.android.document/directory&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;!-- @see android.apps.file.MimeTypes#isSupportedArchive(String) --&gt;
          &lt;!--
            ~ We don't really support content URI archives.
            ~ TODO: Figure out a good way to allow choosing this activity only in our app, or
            ~ support content URI archives.
          &lt;intent-filter tools:ignore=&quot;AppLinkUrlError&quot;&gt;
              &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;data android:mimeType=&quot;application/gzip&quot; /&gt;
              &lt;data android:mimeType=&quot;application/java-archive&quot; /&gt;
              &lt;data android:mimeType=&quot;application/rar&quot; /&gt;
              &lt;data android:mimeType=&quot;application/zip&quot; /&gt;
              &lt;data android:mimeType=&quot;application/vnd.android.package-archive&quot; /&gt;
              &lt;data android:mimeType=&quot;application/vnd.debian.binary-package&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-7z-compressed&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-bzip2&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-compress&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-cpio&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-deb&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-debian-package&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-gtar&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-gtar-compressed&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-java-archive&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-lzma&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-tar&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-xz&quot; /&gt;
          &lt;/intent-filter&gt;
          --&gt;
          &lt;!-- @see https://android.googlesource.com/platform/packages/apps/DocumentsUI/+/master/AndroidManifest.xml --&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.OPEN_DOCUMENT&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.OPENABLE&quot; /&gt;
              &lt;data android:mimeType=&quot;*/*&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;!--
            ~ Unusable until we implement DocumentsProvider.
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.CREATE_DOCUMENT&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.OPENABLE&quot; /&gt;
              &lt;data android:mimeType=&quot;*/*&quot; /&gt;
          &lt;/intent-filter&gt;
          --&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.GET_CONTENT&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.OPENABLE&quot; /&gt;
              &lt;data android:mimeType=&quot;*/*&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;!--
            ~ Unusable until we implement DocumentsProvider.
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.OPEN_DOCUMENT_TREE&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
          &lt;/intent-filter&gt;
          --&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.apps.intent.action.VIEW_DOWNLOADS&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name=&quot;android.app.shortcuts&quot;
              android:resource=&quot;@xml/shortcuts&quot; /&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;android.apps.filelist.OpenFileAsDialogActivity&quot;
          android:autoRemoveFromRecents=&quot;true&quot;
          android:icon=&quot;@drawable/open_as_icon&quot;
          android:label=&quot;@string/file_open_as_title&quot;
          android:theme=&quot;@style/Theme.MaterialFiles.Translucent&quot; /&gt;
  
      &lt;activity
          android:name=&quot;android.apps.ftpserver.FtpServerActivity&quot;
          android:label=&quot;@string/ftp_server_title&quot;
          android:launchMode=&quot;singleTop&quot;
          android:theme=&quot;@style/Theme.MaterialFiles&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.apps.intent.action.MANAGE_FTP_SERVER&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name=&quot;android.support.PARENT_ACTIVITY&quot;
              android:value=&quot;android.apps.filelist.FileListActivity&quot; /&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;apps.settings.SettingsActivity&quot;
          android:label=&quot;@string/settings_title&quot;
          android:launchMode=&quot;singleTop&quot;
          android:theme=&quot;@style/Theme.MaterialFiles&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.APPLICATION_PREFERENCES&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name=&quot;android.support.PARENT_ACTIVITY&quot;
              android:value=&quot;android.apps.filelist.FileListActivity&quot; /&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;android.apps.settings.StandardDirectoriesActivity&quot;
          android:label=&quot;@string/settings_standard_directories_title&quot;
          android:launchMode=&quot;singleTop&quot;
          android:theme=&quot;@style/Theme.MaterialFiles&quot;&gt;
          &lt;meta-data
              android:name=&quot;android.support.PARENT_ACTIVITY&quot;
              android:value=&quot;android.apps.settings.SettingsActivity&quot; /&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;android.apps.settings.BookmarkDirectoriesActivity&quot;
          android:label=&quot;@string/settings_bookmark_directories_title&quot;
          android:launchMode=&quot;singleTop&quot;
          android:theme=&quot;@style/Theme.MaterialFiles&quot;&gt;
          &lt;meta-data
              android:name=&quot;android.support.PARENT_ACTIVITY&quot;
              android:value=&quot;android.apps.settings.SettingsActivity&quot; /&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;android.apps.about.AboutActivity&quot;
          android:label=&quot;@string/about_title&quot;
          android:launchMode=&quot;singleTop&quot;
          android:theme=&quot;@style/Theme.MaterialFiles&quot;&gt;
          &lt;meta-data
              android:name=&quot;android.support.PARENT_ACTIVITY&quot;
              android:value=&quot;com.filemanagere.android.apps.filelist.FileListActivity&quot; /&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;android.apps.filejob.FileJobActionDialogActivity&quot;
          android:autoRemoveFromRecents=&quot;true&quot;
          android:theme=&quot;@style/Theme.MaterialFiles.Translucent&quot; /&gt;
  
      &lt;activity
          android:name=&quot;android.apps.filejob.FileJobConflictDialogActivity&quot;
          android:autoRemoveFromRecents=&quot;true&quot;
          android:theme=&quot;@style/Theme.MaterialFiles.Translucent&quot; /&gt;
  
      &lt;activity
          android:name=&quot;android.apps.viewer.text.TextEditorActivity&quot;
          android:label=&quot;@string/text_editor_title&quot;
          android:theme=&quot;@style/Theme.MaterialFiles&quot;&gt;
          &lt;intent-filter tools:ignore=&quot;AppLinkUrlError&quot;&gt;
              &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;data android:mimeType=&quot;application/ecmascript&quot; /&gt;
              &lt;data android:mimeType=&quot;application/javascript&quot; /&gt;
              &lt;data android:mimeType=&quot;application/json&quot; /&gt;
              &lt;data android:mimeType=&quot;application/typescript&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-sh&quot; /&gt;
              &lt;data android:mimeType=&quot;application/x-shellscript&quot; /&gt;
              &lt;data android:mimeType=&quot;application/xml&quot; /&gt;
              &lt;data android:mimeType=&quot;text/*&quot; /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=&quot;android.apps.viewer.image.ImageViewerActivity&quot;
          android:label=&quot;@string/image_viewer_title&quot;
          android:theme=&quot;@style/Theme.MaterialFiles.Immersive&quot;&gt;
          &lt;intent-filter tools:ignore=&quot;AppLinkUrlError&quot;&gt;
              &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
              &lt;data android:mimeType=&quot;image/*&quot; /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;service android:name=&quot;android.apps.filejob.FileJobService&quot; /&gt;
  
      &lt;service android:name=&quot;android.apps.ftpserver.FtpServerService&quot; /&gt;
  
      &lt;provider
          android:name=&quot;android.apps.AppProvider&quot;
          android:authorities=&quot;@string/app_provider_authority&quot;
          android:exported=&quot;false&quot; /&gt;
  
      &lt;provider
          android:name=&quot;android.apps.file.FileProvider&quot;
          android:authorities=&quot;@string/file_provider_authority&quot;
          android:exported=&quot;false&quot;
          android:grantUriPermissions=&quot;true&quot; /&gt;
  
      &lt;receiver android:name=&quot;android.apps.filejob.FileJobReceiver&quot; /&gt;
  
      &lt;receiver android:name=&quot;android.apps.ftpserver.FtpServerReceiver&quot; /&gt;
  
      &lt;meta-data
          android:name=&quot;firebase_crashlytics_collection_enabled&quot;
          android:value=&quot;false&quot; /&gt;
  
      &lt;!-- We need to reference a MD2 theme in XML for R8 to keep relevant resources. --&gt;
      &lt;activity
          android:name=&quot;.KeepMd2Resources&quot;
          android:theme=&quot;@style/Theme.MaterialFiles.Md2&quot; /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>Знаете кого-нибудь, кто может ответить?
  ошибка сбора в AndroidManifest.xml</p>
  <p>AAPT: ошибка: атрибут android: requestLegacyExternalStorage не найден.</p>
  <p>For ionic developers please refer to this answer to fix this issue:
  <a href="https://stackoverflow.com/a/65595715/10533962">https://stackoverflow.com/a/65595715/10533962</a></p>