当前位置:网站首页>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 ~
边栏推荐
猜你喜欢

Sword finger offer high quality code

$parent(获取父组件) 和 $root(获取根组件)

Leetcode t1165: log analysis

Can 7-day zero foundation prove HCIA? Huawei certification system learning path sharing

SolidWorks的GB库(钢型材库,包括铝型材、铝管等结构)安装及使用教程(生成铝型材为例)

Bus消息总线

How DHCP router works

MOS管参数μCox得到的一种方法

关于数据库数据转移的问题,求各位解答下
![How to model and simulate the target robot [mathematical / control significance]](/img/bd/79f6338751b6773859435c54430ec3.png)
How to model and simulate the target robot [mathematical / control significance]
随机推荐
Stack Title: nesting depth of valid parentheses
SolidWorks的GB库(钢型材库,包括铝型材、铝管等结构)安装及使用教程(生成铝型材为例)
Mysql---- import and export & View & Index & execution plan
根据IP获取地市
Multidisciplinary integration
异步组件和Suspense(真实开发中)
Please answer the questions about database data transfer
Get the city according to IP
SVN version management in use replacement release and connection reset
[noi simulation] regional division (conclusion, structure)
带你刷(牛客网)C语言百题(第一天)
请教一个问题,flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取全量数据
Jetpack Compose 远不止是一个UI框架这么简单~
MOS tube parameters μ A method of Cox
leetcode 509. Fibonacci Number(斐波那契数字)
readonly 只读
一条慢SQL拖死整个系统
DB2获取表信息异常:Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][4.25.13]
请教一下,监听pgsql ,怎样可以监听多个schema和table
Sword finger offer high quality code