我正在尝试运行应用程序,但构建失败,显示以下错误:
无法解析\app\src\main\AndroidManifest.xml 中的 XML
org.xml.sax.SAXParseException; systemId:文件:/app/src/main/AndroidManifest.xml;行号:2;列数:62;与元素类型“uses-feature”关联的属性“android:name”的前缀“android”未绑定(bind)。
这是我的 AndroidManifest.xml 文件:
<?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>
最佳答案
转到“构建”->“清理项目”并“重建项目”。有用 ... 或者(如果干净的项目不起作用/显示错误) 从“C盘”手动删除构建文件夹
关于java - 无法解析 AndroidManifest.xml 中的 XML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62383662/