創建項目錯誤:error: Error: No resource found that matches the given name: attr 'android:windowElevation'.

升級sdk 到5.0時,創建項目時會多創建一個庫項目,叫appcompat_v7。
創建完成後,這個項目可能會報錯,諸如出現:No resource found that matches the given name 'android:Widget.Material.ActionButton'等錯誤。
 

解決方案1:

使用sdk manager下載以下內容:
 
 
 
解決方案2:
如果你不想創建appcompat_v7,你可以在創建項目時將minimum Required SDK設置爲4.1以上,這時就不再生成
appcompat_v7項目了,然後你再去清單文件中將minSdkVersion還原爲8就行了.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章