标题中的错误出现在 Android Studio 中,作为我所有代码上方的警告栏:
Android Studio 版本:Android Studio1.1.0
的 Kotlin 插件版本:0.11.91.AndroidStudio.4
build.gradle
似乎正在使用所有最新版本的 Kotlin 库的文件:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "ca.amandeep.simpletransit"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile('com.squareup.retrofit:converter-simplexml:1.9.0') {
exclude module: 'stax'
exclude module: 'stax-api'
exclude module: 'xpp3'
}
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
compile 'com.google.guava:guava:18.0'
compile 'com.facebook.stetho:stetho:1.0.1'
compile 'com.facebook.stetho:stetho-okhttp:1.0.1'
compile 'com.jakewharton.timber:timber:2.7.1'
compile 'io.reactivex:rxkotlin:0.21.0'
compile 'io.reactivex:rxandroid:0.24.0'
compile 'com.github.techfreak:wizardpager:1.0.0'
}
buildscript {
ext.kotlin_version = '0.11.91.1'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
repositories {
mavenCentral()
}
apply plugin: 'com.jakewharton.hugo'