小编Rod*_*nko的帖子

Android kotlin 项目构建卡在 app:kaptDebugKotlin 任务上

我在项目构建过程中遇到了下一个问题:构建过程只是停留在app:kaptDebugKotlin任务上。我的根项目build.gradle

apply plugin: "kotlin"
buildscript {
    ext.kotlin_version = '1.1.2-2'
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"            
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
    }
}

ext {
    buildToolsVersion = '25.0.2'
    supportLibVersion = '25.3.1'
    runnerVersion = '0.5'
    rulesVersion = '0.5'
    espressoVersion = '2.2.2'
    archLifecycleVersion = '1.0.0-alpha1'
    archRoomVersion = '1.0.0-alpha1'
}
Run Code Online (Sandbox Code Playgroud)

和应用程序build.gradle本身:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 25
    buildToolsVersion rootProject.ext.buildToolsVersion
    defaultConfig …
Run Code Online (Sandbox Code Playgroud)

android kotlin build.gradle

6
推荐指数
1
解决办法
1379
查看次数

标签 统计

android ×1

build.gradle ×1

kotlin ×1