我有一个使用Android studio完成的旅行刨床应用程序。 尝试运行时出现以下错误。
No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
答案 0 :(得分:0)
make a color.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorBackground">#0097E3</color>
<color name="light_blue">#3F51B5</color>
<color name="grey">#303F9F</color>
</resources>
Change Theme in Style:-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#4E86FF</item>
<item name="colorPrimaryDark">#3e6bcc</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
and tempopary Comment on
<!--<meta-data-->
<!--android:name="com.google.android.maps.v2.API_KEY"-->
<!--android:value="@string/google_maps_api_key" />-->
Change Gradle With this One:
classpath 'com.android.tools.build:gradle:2.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'