错误Android Studio中编译项目 [英] Error Compiling Project in Android Studio

查看:266
本文介绍了错误Android Studio中编译项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能编译一个项目,如下图所示的android studio.I得到4个错误。

I can't compile a project in android studio.I get 4 errors as shown below.

这包含错误我的XML文件是:

My xml file that contains the error is :

<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的工作室进口它,我不能编译建后援项目早期工作的罚款。
通过给一些一步一步solution.I我坚持在这4小时now.Thanks了很多的帮助,请帮助。

I need to modify a project built on IntelliJ. I have imported it in Android-Studio and I can't compile it.The project built earlier worked fine. Please help by giving some step-by-step solution.I am stuck in this for 4 hrs now.Thanks a lot for your help.

推荐答案

您是最有可能缺少程序兼容性库。应用程序兼容性是库项目。您需要引用库项目在你的Andr​​oid project.use此链接添加您的支持包的链接添加应用程序兼容性

You are most probably missing AppCompat library which comes in support directory.AppCompat is a library project. You need to reference the library project in your android project.use this link to add your support package link to add app compat

您使用此父=@风格/ Theme.AppCompat使用它代替父=@安卓风格/ Theme.AppCompat 。我想他们有错字的文件档案

you are using this parent="@style/Theme.AppCompat" instead use this parent="@android:style/Theme.AppCompat".i guess they have typo in the docs file

这篇关于错误Android Studio中编译项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆