我无法在android studio中编译项目。我得到4个错误,如下所示。包含错误在Android Studio中编译项目时出错
我的XML文件是:
<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>
错误是:
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'.
Error:(7, -1) android-apt-compiler: [main] D:\android\tinynote\app\src\main\res\values\theme.xml:7: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
Error:(11, -1) android-apt-compiler: [main] D:\android\tinynote\app\src\main\res\values\theme.xml:11: error: Error retrieving parent for item: No resource found that matches the given name '@style/Widget.AppCompat.ActionBar.Solid'.
Error:(12, -1) android-apt-compiler: [main] D:\android\tinynote\app\src\main\res\values\theme.xml:12: error: Error: No resource found that matches the given name: attr 'background'.
我需要修改建的IntelliJ的项目。我已经将它导入到Android-Studio中,并且我无法编译它。之前构建的项目工作正常。 请给予一些分步解决方案,以帮助我。我坚持了4小时now.Thanks很多,为您的帮助。
你有build.gradle的依赖项部分中的appcompat库? – 2014-10-02 14:41:24
@ Tanis7x我有这样的代码:依赖关系在我的build.gradle文件中编译com.android.support:appcompat-v7:20.+' }。你能提出什么可能是错的吗?谢谢。 – 2014-10-02 14:42:19
看到我编辑的答案 – goonerDroid 2014-10-02 15:05:58