AAPT: error: attribute android:requestLegacyExternalStorage not found : <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="1.0" encoding="utf-8"?&gt;

&lt;manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="android.apps"&gt;

&lt;uses-feature android:name="android.hardware.wifi" android:required="false" /&gt;

&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
&lt;uses-permission android:name="android.permission.FOREGROUND_SERVICE" /&gt;
&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /&gt;
&lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;

&lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;

&lt;application
    android:allowBackup="true"
    android:fullBackupContent="true"
    android:icon="@mipmap/launcher_icon"
    android:label="@string/app_name"
    android:requestLegacyExternalStorage="true"
    android:roundIcon="@mipmap/launcher_icon"
    android:supportsRtl="true"
    android:theme="@style/Theme.MaterialFiles"
    tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"&gt;

    &lt;activity
        android:name="android.apps.filelist.FileListActivity"
        android:label="@string/file_list_title"
        android:theme="@style/Theme.MaterialFiles.TransparentStatusBar"
        android:visibleToInstantApps="true"
        tools:ignore="UnusedAttribute"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
        &lt;intent-filter tools:ignore="AppLinkUrlError"&gt;
            &lt;action android:name="android.intent.action.VIEW" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;data android:mimeType="inode/directory" /&gt;
            &lt;data android:mimeType="resource/folder" /&gt;
            &lt;data android:mimeType="vnd.android.document/directory" /&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="AppLinkUrlError"&gt;
            &lt;action android:name="android.intent.action.VIEW" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;data android:mimeType="application/gzip" /&gt;
            &lt;data android:mimeType="application/java-archive" /&gt;
            &lt;data android:mimeType="application/rar" /&gt;
            &lt;data android:mimeType="application/zip" /&gt;
            &lt;data android:mimeType="application/vnd.android.package-archive" /&gt;
            &lt;data android:mimeType="application/vnd.debian.binary-package" /&gt;
            &lt;data android:mimeType="application/x-7z-compressed" /&gt;
            &lt;data android:mimeType="application/x-bzip2" /&gt;
            &lt;data android:mimeType="application/x-compress" /&gt;
            &lt;data android:mimeType="application/x-cpio" /&gt;
            &lt;data android:mimeType="application/x-deb" /&gt;
            &lt;data android:mimeType="application/x-debian-package" /&gt;
            &lt;data android:mimeType="application/x-gtar" /&gt;
            &lt;data android:mimeType="application/x-gtar-compressed" /&gt;
            &lt;data android:mimeType="application/x-java-archive" /&gt;
            &lt;data android:mimeType="application/x-lzma" /&gt;
            &lt;data android:mimeType="application/x-tar" /&gt;
            &lt;data android:mimeType="application/x-xz" /&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="android.intent.action.OPEN_DOCUMENT" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;category android:name="android.intent.category.OPENABLE" /&gt;
            &lt;data android:mimeType="*/*" /&gt;
        &lt;/intent-filter&gt;
        &lt;!--
          ~ Unusable until we implement DocumentsProvider.
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.CREATE_DOCUMENT" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;category android:name="android.intent.category.OPENABLE" /&gt;
            &lt;data android:mimeType="*/*" /&gt;
        &lt;/intent-filter&gt;
        --&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.GET_CONTENT" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;category android:name="android.intent.category.OPENABLE" /&gt;
            &lt;data android:mimeType="*/*" /&gt;
        &lt;/intent-filter&gt;
        &lt;!--
          ~ Unusable until we implement DocumentsProvider.
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.OPEN_DOCUMENT_TREE" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
        --&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.apps.intent.action.VIEW_DOWNLOADS" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
        &lt;meta-data
            android:name="android.app.shortcuts"
            android:resource="@xml/shortcuts" /&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="android.apps.filelist.OpenFileAsDialogActivity"
        android:autoRemoveFromRecents="true"
        android:icon="@drawable/open_as_icon"
        android:label="@string/file_open_as_title"
        android:theme="@style/Theme.MaterialFiles.Translucent" /&gt;

    &lt;activity
        android:name="android.apps.ftpserver.FtpServerActivity"
        android:label="@string/ftp_server_title"
        android:launchMode="singleTop"
        android:theme="@style/Theme.MaterialFiles"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.apps.intent.action.MANAGE_FTP_SERVER" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="android.apps.filelist.FileListActivity" /&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="apps.settings.SettingsActivity"
        android:label="@string/settings_title"
        android:launchMode="singleTop"
        android:theme="@style/Theme.MaterialFiles"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.APPLICATION_PREFERENCES" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="android.apps.filelist.FileListActivity" /&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="android.apps.settings.StandardDirectoriesActivity"
        android:label="@string/settings_standard_directories_title"
        android:launchMode="singleTop"
        android:theme="@style/Theme.MaterialFiles"&gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="android.apps.settings.SettingsActivity" /&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="android.apps.settings.BookmarkDirectoriesActivity"
        android:label="@string/settings_bookmark_directories_title"
        android:launchMode="singleTop"
        android:theme="@style/Theme.MaterialFiles"&gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="android.apps.settings.SettingsActivity" /&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="android.apps.about.AboutActivity"
        android:label="@string/about_title"
        android:launchMode="singleTop"
        android:theme="@style/Theme.MaterialFiles"&gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.filemanagere.android.apps.filelist.FileListActivity" /&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="android.apps.filejob.FileJobActionDialogActivity"
        android:autoRemoveFromRecents="true"
        android:theme="@style/Theme.MaterialFiles.Translucent" /&gt;

    &lt;activity
        android:name="android.apps.filejob.FileJobConflictDialogActivity"
        android:autoRemoveFromRecents="true"
        android:theme="@style/Theme.MaterialFiles.Translucent" /&gt;

    &lt;activity
        android:name="android.apps.viewer.text.TextEditorActivity"
        android:label="@string/text_editor_title"
        android:theme="@style/Theme.MaterialFiles"&gt;
        &lt;intent-filter tools:ignore="AppLinkUrlError"&gt;
            &lt;action android:name="android.intent.action.VIEW" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;data android:mimeType="application/ecmascript" /&gt;
            &lt;data android:mimeType="application/javascript" /&gt;
            &lt;data android:mimeType="application/json" /&gt;
            &lt;data android:mimeType="application/typescript" /&gt;
            &lt;data android:mimeType="application/x-sh" /&gt;
            &lt;data android:mimeType="application/x-shellscript" /&gt;
            &lt;data android:mimeType="application/xml" /&gt;
            &lt;data android:mimeType="text/*" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name="android.apps.viewer.image.ImageViewerActivity"
        android:label="@string/image_viewer_title"
        android:theme="@style/Theme.MaterialFiles.Immersive"&gt;
        &lt;intent-filter tools:ignore="AppLinkUrlError"&gt;
            &lt;action android:name="android.intent.action.VIEW" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;data android:mimeType="image/*" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;

    &lt;service android:name="android.apps.filejob.FileJobService" /&gt;

    &lt;service android:name="android.apps.ftpserver.FtpServerService" /&gt;

    &lt;provider
        android:name="android.apps.AppProvider"
        android:authorities="@string/app_provider_authority"
        android:exported="false" /&gt;

    &lt;provider
        android:name="android.apps.file.FileProvider"
        android:authorities="@string/file_provider_authority"
        android:exported="false"
        android:grantUriPermissions="true" /&gt;

    &lt;receiver android:name="android.apps.filejob.FileJobReceiver" /&gt;

    &lt;receiver android:name="android.apps.ftpserver.FtpServerReceiver" /&gt;

    &lt;meta-data
        android:name="firebase_crashlytics_collection_enabled"
        android:value="false" /&gt;

    &lt;!-- We need to reference a MD2 theme in XML for R8 to keep relevant resources. --&gt;
    &lt;activity
        android:name=".KeepMd2Resources"
        android:theme="@style/Theme.MaterialFiles.Md2" /&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p>Знаете кого-нибудь, кто может ответить?
ошибка сбора в AndroidManifest.xml</p>

<p>AAPT: ошибка: атрибут android: requestLegacyExternalStorage не найден.</p>
