我按照android developer site上的說明導入了v7-appcompat支持庫,並遇到許多其他用戶遇到的缺失R問題。我已經通過several類似questions用戶have張貼here,並嘗試了什麼建議,但我仍然得到缺少的R問題。我已經重新導入了appcompat庫,清理了我的項目,重新啓動了eclipse,在清單和屬性中都更改了我的min和target SDK,但仍然存在相同的問題。關於R的確切錯誤是「R無法解析爲變量」。Android:導入v7後出現R問題appcompat
另外,值文件夾中的attrs xml文件有一個錯誤,當我添加庫時卻也沒有人提到過。這是該文件中的代碼:
<declare-styleable name="ButtonBarContainerTheme">
<attr name="buttonBarStyle" format="reference" />
<attr name="buttonBarButtonStyle" format="reference" />
</declare-styleable>
Eclipse給我的錯誤是「error:Attribute'buttonBarStyle'has already been defined」。任何幫助,將不勝感激!
你是否從你的logcat得到任何反饋? – Submersed
不,logcat和控制檯都不顯示任何東西。 – CheeseCoder
請發佈*確切*錯誤消息。釋義經常會丟失對於幫助您解決問題至關重要的信息。 –