android - 错误 : String types not allowed (at 'screenOrientation' with value 'sensorPortait' )

标签 android

我导入了 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 APIs 2.3.3。 10. 我还启用了 Java 编译器项目特定设置并将编译器合规性错误设置为 1.6。

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

最佳答案

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

android:screenOrientation="sensorPortrait" 只能在 API 级别 16+ 上工作

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

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

关于android - 错误 : String types not allowed (at 'screenOrientation' with value 'sensorPortait' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12129558/

相关文章:

java - 在Android中使用JAVA在onFocusChange中使用AsyncTask

android - 如何从通知导航到 fragment ?安卓 Kotlin

android - Android SQLite 游标是否一次将所有记录加载到内存中?

android - 如何在 webview 中从我的资源加载图片?

android - 使用AccountManager时是否可以让用户在应用程序中授权权限

android - 关于主题、栏等,不确定我是否应该使用 AppCompat

android - 修改 Numberpicker Android 中的选中项

android - 在 android/Xamarin.Android 中单击通知时切换到运行 Activity

android - TextInputLayout 的不同标签和提示

android - ListView的回收是如何工作的