I am using Android Studio 3 preview to code and build a android kotlin project but it does not seem to compile due to this error:
我正在使用Android Studio 3预览代码并构建一个android kotlin项目,但由于此错误,它似乎无法编译:
: java.lang.Exception: Unable to get response from daemon in 10000 ms
:java.lang.Exception:无法在10000毫秒内从守护程序获取响应
Could not perform incremental compilation: Could not connect to Kotlin compile daemon Could not connect to kotlin daemon. Using fallback strategy.
无法执行增量编译:无法连接到Kotlin编译守护程序无法连接到kotlin守护程序。使用后备策略。
Error:Failed to complete Gradle execution. Cause: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
Here is my gradle build file
这是我的gradle构建文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
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
}
}
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 "com.jr.app"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "DEMO_SERVER_URL", "https://demoserver.restlet.net/v1/"
}
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:appcompat-v7:26.0.0'
implementation 'com.android.support:design:26.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.android.support:support-v4:26.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.0'
}
Thanks