我正在嘗試開發和android應用程序,而且我被這個錯誤困住了好幾天。我知道有類似的問題通過閱讀他們不幸沒有幫助我。 這裏是我的AndroidManifest.xml找不到與給定名稱相匹配的資源(在'主題'中使用值'@ style/AppTheme')
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kostas.android.waveradio"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="23" />
<application
android:name="com.android.tools.fd.runtime.BootstrapApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity android:name="com.kostas.android.waveradio.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我styles.xml文件
<resources>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="MyMaterialTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="MyMaterialTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
非常感謝你提前。
已更新我的回答,提供更多信息。請接受它是否解決了你的答案,或者它是否幫助你找到答案並且upvote(如果你願意的話)。這會給你聲譽,並且也會向我捐贈代表。 –
似乎你不太瞭解Android樣式的工作原理。 [這是一個詳細的教程](http://www.androidhive.info/2015/04/android-getting-started-with-material-design/)! –