導入Actionbarssherlock 和appcompat_v7 衝突的問題以及解決方法

Actionbarssherlock 和appcompat_v7 衝突報出異常,

類似於 error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

·······································

 

因爲Actionbarssherlock下和v7包下attrs.xml下的屬性名重名了;

解決方法有以下幾種:

一:

  • Right click on the project
  • Select Android Tools from the pop up window
  • Select Add Support Library

二:Remove the appcompact support library project from Properties = > Android 如果你此時在使用anctioBar等依賴於v7的話,這個就不能用了

 

三:

I solved this by removing appcompact from project, and changing in styles to

<style name="AppBaseTheme" parent="Theme.Sherlock">

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章