天天看點

Andoird appcompat_v7資源檔案報錯

電腦型号:thinkpad x240

作業系統:ubuntu 14.04

開發工具:eclipse

appcompat_v7的一些資源檔案報錯,錯誤消息如下:

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:82: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:79: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:80: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:118: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:120: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:121: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:119: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:116: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:117: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:155: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:157: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:158: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:156: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:153: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:154: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:192: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2015-03-10 11:03:19 - AIDLText] 

[2015-03-10 11:03:19 - AIDLText] /home/csm/workspace/appcompat_v7/res/values-v21/themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2015-03-10 11:03:19 - AIDLText] 

我的解決方法是:将appcompat_v7的project.properties檔案中的target=android-20修改為target=android-21,希望對大家有幫助。

繼續閱讀