Android projemde Java 1.8 ile çalışmak için Kotlin'i yapılandırmaya çalışıyorum. compileKotlin
bloğumu build.gradle
dosyamın altına eklemeye çalıştım, ancak bunu yaparsam bir hata alıyorum.compileKotlin bloğu hata veriyor "Argümanlar için yöntem compileKotlin() bulunamadı [...]"
Error:(38, 0) Could not find method compileKotlin() for arguments [[email protected]] on project ':core' of type org.gradle.api.Project.
proje bu blokta olmadan iyi çalışır: oluştuğunda
hata şudur. Neyi kaçırıyorum? projede hiçbir compileKotlin
görev var olduğunu
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 24
targetSdkVersion 25
versionCode 1
versionName '1.0.0'
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.google.android.support:wearable:2.0.2'
}
repositories {
mavenCentral()
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
jvmTarget = '1.8'
apiVersion = '1.1'
languageVersion = '1.1'
}
}
, ben compileKotlin tüm uygulanmıştır düşünce varyantlar oluşturuyor ama görünüşe göre değil. Teşekkürler! – SolveSoul
iyi çalışıyor, çalışmayı dosya sonuna koyduğumda: D –