簡體   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