问题
I am trying to modify an existing android project built on IntelliJ. I have searched and tried many things but still my error doesn't go :\
Error:(5, -1) android-apt-compiler: [main] D:\android\tinynote\app\src\main\res\values\theme.xml:5:
error: Error retrieving parent for item: No resource found that matches the given name
'@style/Theme.AppCompat'.
What can I do ? Thanks in advance.
Specifically, error is in theme.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Bootstrap.Dark" parent="@style/Theme.AppCompat">
<item name="android:windowBackground">@color/pager_background</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>
<style name="Widget.Styled.ActionBar" parent="@style/Widget.AppCompat.ActionBar.Solid">
<item name="background">@drawable/actionbar_background</item>
<item name="android:background">@drawable/actionbar_background</item>
</style>
回答1:
Try adding
dependencies {
compile 'com.android.support:appcompat-v7:20.+'
}
to your build.gradle file
来源:https://stackoverflow.com/questions/26161501/error-in-compiling-android-studio