我收到此錯誤styles.xml:錯誤檢索父的項目:無資源發現在給定名稱匹配 'Theme.AppCompat.Light'
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
<style name="AppTheme" parent="AppBaseTheme"></style>
<style name="AppBaseTheme" parent="Theme.AppCompat.Light"> --->Error line
<item name="colorPrimary">@color/holo_orange</item>
<item name="colorPrimaryDark">@color/holo_orange_dark</item>
</style>
然後右鍵點擊項目 - >屬性 - > Android
然後我清單:
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21" />
.......
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppBaseTheme" >
......
</application>
排序和導出:
我相信我已經在構建工具更新我的SDK 21的最新版本,平臺工具,Extras等。我不知道爲什麼這個錯誤仍然發生。我試着重新啓動我的eclipse並清理項目。它仍然發生。
我想你還需要在項目 –
中添加'appCompat'庫讓我知道該怎麼做? @ρяσѕρєяK – Steve
見[無法找到新的Android ActionBar支持Theme.AppCompat.Light](http://stackoverflow.com/questions/17870881/cant-find-theme-appcompat-light-for-new-android-actionbar - 支持)可能幫助 –