標籤:evel ret 右上方 with owa 文本 blog 目標 vhdl
android匯入項目出現style錯誤,menu錯誤
style
//查看 res/values/styles.xml 下的報錯點。 <style name="AppBaseTheme" parent="Theme.AppCompat.Light">//把這個改成<style name="AppBaseTheme" parent="android:Theme.Light">//路徑: res/values-11/styles.xml <style name="AppBaseTheme" parent="Theme.AppCompat.Light">//把這個改成<style name="AppBaseTheme" parent="android:Theme.Holo.Light">//路徑: res/values-14/styles.xml <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">//把這個換成 <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
meun
No resource identifier found for attribute ‘showAsAction‘ in package ‘android‘運行一個項目時在一個menu.xml檔案item屬性android:showAsAction 報錯 No resource identifier found for attribute ‘showAsAction‘ in package ‘android‘google了下,老外說是版本問題,showAsAction was added in API level 11要將API提升到11,添加 "android-support-v7-appcompat.jar" 到Android庫( Private Libraries)android:showAsAction = "never"當你的應用程式目標設為蜂巢平台時,你可以利用Action Bar組件提供的全部功能,將你的選項功能表項目放在Action Bar的右上方,對使用者來說使用更方便,控制該行為的主功能表項目屬性是android:showAsAction。 這個屬性可接受的值有: 1、always:這個值會使功能表項目一直顯示在Action Bar上。 2、ifRoom:如果有足夠的空間,這個值會使功能表項目顯示在Action Bar上。 3、never:這個值使功能表項目永遠都不出現在Action Bar上。 4、withText:這個值使功能表項目和它的表徵圖,菜單文本一起顯示。不過這裡沒有用到這高版本,此處刪除這個屬性就OK了。
android匯入項目出現style錯誤,menu錯誤