这是我的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)
这是我第一次看到这个问题,那么这个问题有一个干净的解决方案吗?