android - 'android:required' 未找到
问题描述
每次我想构建/清理/重建我的应用程序时,我都会收到以下错误消息。
error: attribute 'android:requiered' not found.
Message{kind=ERROR, text=error: attribute 'android:requiered' not found., sources=[C:\Users\M\AndroidStudioProjects\MyFirstApp\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:11], original message=, tool name=Optional.of(AAPT)}
我很困惑,因为我的 manifest.xml 有需要的代码:
<?xml version="1.0" encoding="utf-8"?>
<uses-feature
android:name="android.hardware.camera"
android:requiered="true"/>
<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>
</activity>
</application>
解决方案
这是一个错字。正确的写法是android:required
。
推荐阅读
- apache-spark - Spark SQL 窗口顺序的行为
- android - 如何将 Linphone 与 Android SIP 堆栈结合使用
- sql - 多个一对多表过滤较低的表值
- sql - 如何从 select 进行 Oracle SQL 更新?
- weblate - 如何设置 weblate 来处理带有 resx 文件的 .net 项目
- amazon-web-services - 如何使用 AWS CLI 在 S3 存储桶中一次删除多个图像
- vb.net - vb.net 如何从 String 解析到 DateTime
- ios - Apple Watch - 以编程方式获取元素的宽度 - WKInterfaceTable、WKInterfaceGroup
- ansible - 在循环中的模板查找中使用 item 变量
- php - PHP Parent Class is a DB connection:由于继承而多次使用会影响性能吗?