我遇到了以下错误:
Error:(89, 39) error: incomparable types: CAP#1 and int
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Error:Execution failed for task ':app:compileDebugJava'.
编译失败,请查看编译器错误输出以获取详细信息。
我的Gradle文件如下所示:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0 rc3"
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
jcenter()
}
defaultConfig {
applicationId "wishlist.oj.app"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:21.+'
compile 'com.android.support:cardview-v7:21.+'
}
错误来自于我的Recycler View适配器文件,它只是将多个文本视图填充到回收站视图中。
buildToolsVersion "23.0.2"
。你的类路径是什么? - IntelliJ Amiyaclasspath 'com.android.tools.build:gradle:1.5.0'
? - IntelliJ Amiya