简体   繁体   中英

Failed to parse XML in AndroidManifest.xml

I am trying to run an app but the building is failing showing the following error: Failed to parse XML in \app\src\main\AndroidManifest.xml

org.xml.sax.SAXParseException; systemId: file:/app/src/main/AndroidManifest.xml; lineNumber: 2; columnNumber: 62; The prefix "android" for attribute "android:name" associated with an element type "uses-feature" is not bound.

Here is my AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="facebook.f8demo">
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera2.full" />
    <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=".ClassifyCamera" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Go to Build-> Clean project and Rebuild project. It works... OR (If clean project is not working/showing error) Delete the build folder manually from "C Drive"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM