Android Studio Build error with AppCompat library newbie q

萝らか妹 提交于 2019-12-10 17:49:30

问题


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. 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.

<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:

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. AppCompat does not. It is definitely installed as it is located in the directory it installs into with the other support libraries. What should I do?


回答1:


Try to change dependencies to next:

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


来源:https://stackoverflow.com/questions/19887180/android-studio-build-error-with-appcompat-library-newbie-q

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!