当前位置:网站首页>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 ~
边栏推荐
- 品牌电商如何逆势增长?在这里预见未来!
- 一条慢SQL拖死整个系统
- DB2获取表信息异常:Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][4.25.13]
- 场馆怎么做体育培训?
- Tool class: object to map hump to underline underline hump
- Matlab tips (30) nonlinear fitting lsqcurefit
- Implementation of AVL tree
- Stack and queue-p78-8 [2011 unified examination true question]
- SolidWorks的GB库(钢型材库,包括铝型材、铝管等结构)安装及使用教程(生成铝型材为例)
- MySql用户权限
猜你喜欢
Sword finger offer high quality code
Maze games based on JS
Redhat5 installing vmware tools under virtual machine
ip地址那点事
2018 Jiangsu Vocational College skills competition vocational group "information security management and evaluation" competition assignment
父组件传递给子组件:Props
MySQL的主从复制原理
How to model and simulate the target robot [mathematical / control significance]
Mysql---- import and export & View & Index & execution plan
Can 7-day zero foundation prove HCIA? Huawei certification system learning path sharing
随机推荐
多个kubernetes集群如何实现共享同一个存储
根据IP获取地市
SolidWorks GB Library (steel profile library, including aluminum profile, aluminum tube and other structures) installation and use tutorial (generating aluminum profile as an example)
Esxi attaching mobile (Mechanical) hard disk detailed tutorial
Matlab tips (29) polynomial fitting plotfit
Leetcode t1165: log analysis
MySQL view bin log and recover data
品牌·咨询标准化
ANR 原理及实践
Config distributed configuration center
Stack and queue-p79-9
RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`问题解决
sqlserver多线程查询问题
Stack and queue-p79-10 [2014 unified examination real question]
How to do sports training in venues?
DB2获取表信息异常:Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][4.25.13]
Take you to brush (niuke.com) C language hundred questions (the first day)
[noi simulation] regional division (conclusion, structure)
MySQL的主从复制原理
Algorithm --- bit count (kotlin)