android导入项目出现style错误,menu错误
生活随笔
收集整理的這篇文章主要介紹了
android导入项目出现style错误,menu错误
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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了。轉載于:https://www.cnblogs.com/huihuizhang/p/6060343.html
總結
以上是生活随笔為你收集整理的android导入项目出现style错误,menu错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SSAS(分析服务)优化手册
- 下一篇: ELASTIC API