在啓動Android工作室3 beta 2版本中我得到這個消息:Android Studio中3科特林版本
「你在 '科特林-STDLIB-1.1.4-2' 科特林運行的版本庫是1.1.4-2,而插件版本是1.1.4-release-Studio3.0-3。 運行庫應該更新以避免兼容性問題。「
在buildscript(項目級別gradle這個)我已經變ext.kotlin_version = '1.1.4-2'
到ext.kotlin_version = '1.1.4-3'
我試圖重建和清潔項目,但沒有工作,我仍然可以在啓動該消息。
搖籃計劃等級:
buildscript {
ext.kotlin_version = '1.1.4-3'
ext.app_compat_version = '26.0.1'
ext.google_play_services = '11.2.0'
ext.firebase_ui_version = '2.1.1'
ext.retrofit_version = '2.3.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta3'
// update kotlin to 1.1.4-2
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
classpath ('com.google.firebase:firebase-plugins:1.1.0'){
exclude group: 'com.google.guava', module: 'guava-jdk5'
}
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
搖籃應用水平:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId ""
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "0.0.1 - Alpha"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//SUPPORT
implementation "com.android.support:appcompat-v7:$app_compat_version"
implementation "com.android.support:design:$app_compat_version"
implementation "com.android.support:cardview-v7:$app_compat_version"
//GOOGLE PLAY SERVICES
compile "com.google.android.gms:play-services-auth:$google_play_services"
//FIREBASE
implementation "com.google.firebase:firebase-auth:$google_play_services"
implementation "com.google.firebase:firebase-database:$google_play_services"
//FIREBASE UI
compile "com.firebaseui:firebase-ui-auth:$firebase_ui_version"
//TRANSITIVE LIBS
compile "com.android.support:preference-v7:$app_compat_version"
compile "com.android.support:customtabs:$app_compat_version"
}
apply plugin: 'com.google.gms.google-services'
Check here https://stackoverflow.com/questions/43928118/outdated-kotlin-runtime-warning-kotlin-plugin-1-1-2-release-studio2-3-3 –
我已經看到,但已經這正是我所描述的,我做了所有這些。 此外我檢查了最新版本https://bintray.com/bintray/jcenter/org.jetbrains.kotlin%3Akotlin-gradle-plugin它說1.1.4-3所以我不明白爲什麼更新gradle手動贏得' t工作 – fkvestak