繁体   English   中英

错误:不允许使用字符串类型(在'screenOrientation'中,值为'sensorPortait')

[英]Error: String types not allowed (at 'screenOrientation' with value 'sensorPortait')

我导入了android项目,我得到了3个错误

error: Error: String types not allowed (at 'screenOrientation' with value 'sensorPortait'). AndroidManifest.xml /com.cartmillimaging.fishingmate.MapViewActivity    line 16 Android AAPT Problem

不同行上的错误相同。

<activity android:name=".MapViewActivity" android:screenOrientation="sensorPortait">

对于项目构建目标,我选择了Google API 2.3.3。 10.我还启用了Java编译器项目特定设置,并将编译器合规性错误设置为1.6。

我是android开发新手,你能帮助我吗?

检查您的API级别。 以下属性:

android:screenOrientation="sensorPortrait"只适用于API级别16+

android:screenOrientation="sensorPortait"可以在15级下工作

我认为这是一个固定的错误

值中存在拼写错误。 正确的名称是“sensorPortrait”

当你加载项目我得到这个错误(我使用api级别10)。 我找到了解决方案。 您将screenOrientation更改为其他内容,保存它,然后返回sensorPortait,现在一切正常。

确认羊绒说的是什么。

我改变了一切

android:screenOrientation="sensorPortrait"

android:screenOrientation="sensorLandscape"

建立了项目,然后再次将其更改为清单中的所有活动,并且所有工作都很好:)

有这个错误,无法踢它。 一些我的构建设置如何选择API 13 ...选择API 21并且不再是问题!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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