android匯入項目出現style錯誤,menu錯誤

來源:互聯網
上載者:User

標籤: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錯誤

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.