错误:(7,8)错误:无法访问android.support.v4.app.TaskStackBuilder的TaskStackBuilder类文件找不到

错误:(7,8)错误:无法访问android.support.v4.app.TaskStackBuilder的TaskStackBuilder类文件找不到,android,gradle,android-studio-2.3,Android,Gradle,Android Studio 2.3,这是我的build.gradle设置: ext { MIN_SDK_VERSION = 14 COMPILE_SDK_VERSION = 23 TARGET_SDK_VERSION = 21 BUILD_TOOLS_VERSION = '25.0.2' VERSION_CODE = 1 VERSION_NAME = "1.0.a" } 这是我的依赖项块。我将其设置为使用v23: dependencies {

这是我的build.gradle设置:

ext {
    MIN_SDK_VERSION     = 14
    COMPILE_SDK_VERSION = 23
    TARGET_SDK_VERSION  = 21
    BUILD_TOOLS_VERSION = '25.0.2'
    VERSION_CODE        = 1
    VERSION_NAME        = "1.0.a"
}
这是我的依赖项块。我将其设置为使用v23:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'

    compile ('com.android.support.constraint:constraint-layout:1.0.1'){
        exclude module: 'support-v4'
        exclude module: 'support-annotations'
        exclude module: 'recyclerview'
        exclude module: 'appcompat'
    }

    testCompile 'junit:junit:4.12'
    compile 'com.jakewharton:butterknife:8.5.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
    compile project(':MapboxAndroidSDK')
    compile('com.github.spurdow:rvlazyscroll:1.0.4') {
        exclude module: 'support-v4'
        exclude module: 'support-annotations'
        exclude module: 'recyclerview'
        exclude module: 'appcompat'
    }

    compile ('com.android.support:multidex:1.0.1'){
        exclude module: 'support-v4'
        exclude module: 'support-annotations'
        exclude module: 'recyclerview'
        exclude module: 'appcompat'
    }
}
这是我在构建应用程序时收到的错误:

Error:(7, 8) error: cannot access TaskStackBuilder
class file for android.support.v4.app.TaskStackBuilder not found
Error:(14, 5) error: method does not override or implement a method from a supertype
Error:(16, 9) error: cannot find symbol variable super
Error:(17, 9) error: cannot find symbol method setContentView(int)
Error:(20, 34) error: cannot find symbol method findViewById(int)

这是我第一次看到这个问题,那么这个问题有没有一个干净的解决方案?

删除support-v4库并以这种方式重新添加,右键单击项目>Android工具>添加支持库。@Radhey我正在使用Android studio。参考此讨论。删除support-v4库并以这种方式重新添加,右键单击项目>Android工具>添加支持库。@Radhey我正在使用Android studio。请参阅此讨论。