简体   繁体   English

AppCompat库新手q的Android Studio Build错误

[英]Android Studio Build error with AppCompat library newbie q

I couldn't find a thread exclusive to studio so I apologize if this is a dup. 我找不到工作室独有的主题,所以我很抱歉,如果这是一个副本。 I am new to android studio and have a basic problem. 我是android studio的新手并且有一个基本问题。 I have all the most recent support libraries installed. 我安装了所有最新的支持库。 I am attempting to use the AppCompat library but it is giving me an error on this line of the styles.xml file. 我正在尝试使用AppCompat库,但它在styles.xml文件的这一行上给了我一个错误。

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

The errors are as follows: 错误如下:

Gradle: Execution failed for task ':FeedBackUser:processDebugResources'.
> Could not call IncrementalTask.taskAction() on task      ':FeedBackUser:processDebugResources'

This is the gradle dependencies: 这是gradle依赖项:

dependencies {

// You must install or update the Support Repository through the SDK manager to use this dependency.
// The Support Repository (separate from the corresponding library) can be found in the Extras category.
compile 'com.android.support:support-v4:18.0.0'

// You must install or update the Support Repository through the SDK manager to use this dependency.
// The Support Repository (separate from the corresponding library) can be found in the Extras category.
compile 'com.android.support:appcompat-v7:0.0.+'

} }

The support v4 is fine, and it shows up in my external libraries area of android studio. 支持v4很好,它出现在android studio的外部库区域。 AppCompat does not. AppCompat没有。 It is definitely installed as it is located in the directory it installs into with the other support libraries. 它肯定是安装的,因为它位于与其他支持库一起安装的目录中。 What should I do? 我该怎么办?

Try to change dependencies to next: 尝试将依赖项更改为next:

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
    compile 'com.android.support:appcompat-v7:18.0.+'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM