如何使用正確的Android支持庫,因爲我在清單文件中有這樣的錯誤:
Theme.AppCompat.Light.DarkActionBar - 無資源發現
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
error: Error: No resource found that matches the given name
(at 'theme' with value '@style/Theme.AppCompat.Light.DarkActionBar').
AndroidManifest.xml /ttab line 39 Android AAPT Problem
我的朋友沒有這種以前實現我另一臺計算機上,現在我必須單獨做這件事。請幫我:)
我使用ADT
我styles.xml:
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="Theme.AppCompat.Light">
<!-- theme customizations here. -->
</style>
<style name="Theme.AppCompat.Light.DarkActionBar" parent="Theme.AppCompat.Light">
<!-- theme customizations here. -->
</style>
</resources>
在eclipse中導入AppCompat庫項目(支持lib v7)。 看到這個 - http://developer.android.com/tools/support-library/index.html – Varun
我做到了這一點,但問題還沒有解決 – Jerry
你是否已經將appcompat項目添加爲應用程序中的庫項目? – Varun