Android 编译报 the <provider> element must be a direct child of the <application>element

报错提示AndroidManifest.xml:28: error: unexpected element found in .

附上代码

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.allerror.cameraalbumtest">
           <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <provider
                android:name="android.support.v4.content,FileProvider"
                android:authorities="com.allerror.cameraalbumtest.fileprovider"
                android:exported="false"
                android:grantUriPermissions="true">
                <meta-date
                    android:name="android.support.FILE_PROVIDER_PATHS"
                    android:resource="@xml/file_paths"/>
            </provider>
        </activity>
    </application>

</manifest>

你的provider标签应该放在application标签里,不应该放在activity的标签里

</activity放错了位置,不应该把provider包含在里面