当前位置:网站首页>Databinding exception of kotlin
Databinding exception of kotlin
2022-07-07 07:07:00 【Dream of changing life】
I'm trying it out recently Kotlin +JetPack Component development project , I met a strange problem , Just trying Databinding When , When compiling a file , There is no mistake , But there will be BR File error . The principle of checking the official website is Kotlin In the use of Databinding When , Need configuration kapt plug-in unit .
Error:(6, 26) Unresolved reference: databinding
terms of settlement :
1、project build.gradle Middle configuration :
buildscript {
ext.kotlin_version ='1.7.0'
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.2"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url 'https://jitpack.io' }
}
}
// The core :
ext.kotlin_version ='1.7.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"
2、app build.gradle Middle configuration :
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
kapt {
generateStubs = true
}
Fix up the work , If you have any questions, please leave a message ~
边栏推荐
猜你喜欢
Several index utilization of joint index ABC
. Net core accesses uncommon static file types (MIME types)
子组件传递给父组件
Brand · consultation standardization
Take you to brush (niuke.com) C language hundred questions (the first day)
RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`问题解决
Maze games based on JS
非父子组件的通信
Jetpack Compose 远不止是一个UI框架这么简单~
Bus message bus
随机推荐
libcurl返回curlcode说明
Algorithm --- bit count (kotlin)
from .onnxruntime_pybind11_state import * # noqa ddddocr运行报错
SolidWorks GB Library (steel profile library, including aluminum profile, aluminum tube and other structures) installation and use tutorial (generating aluminum profile as an example)
请问 flinksql对接cdc时 如何实现计算某个字段update前后的差异 ?
分布式id解决方案
AVL树的实现
sqlserver多线程查询问题
Bus消息总线
毕业设计游戏商城
A slow SQL drags the whole system down
Answer to the second stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition
Network foundation - header, encapsulation and unpacking
readonly 只读
基于JS的迷宫小游戏
【mysqld】Can't create/write to file
Sqlserver multithreaded query problem
oracle如何备份索引
[noi simulation] regional division (conclusion, structure)
JDBC database connection pool usage problem