相关疑难解决方法(0)

在Android Studio 3.2 Canary 16 Kotlin项目上找不到符号DataBindingComponent

我刚刚在Android Studio 3.2 Canary 16上创建了一个新项目,启用了Kotlin.然后我也启用了数据绑定,但是我收到一条错误,说它无法找到DataBindingComponent类.

这是我的项目gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.2.41'
    ext.android_plugin_version = '3.2.0-alpha10'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0-alpha16'
        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
}
Run Code Online (Sandbox Code Playgroud)

我的模块gradle文件:

apply plugin: 'com.android.application'

apply plugin: …
Run Code Online (Sandbox Code Playgroud)

android kotlin android-databinding

82
推荐指数
12
解决办法
4万
查看次数

标签 统计

android ×1

android-databinding ×1

kotlin ×1