大家好,我在android中进行数据绑定时遇到错误之一
在运行代码时,以下内容显示为错误: org.gradle.api.tasks.TaskExecutionException:任务':app:kaptDebugKotlin'的执行失败
这显示为破坏项目时的错误。
这些是我项目的详细信息,我无法理解是什么问题 我的gradle代码
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.snake.implimetations"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
android {
dataBinding {
enabled = true
}
}
}
dependencies {
def lifecycle_version = "1.+"
implementation fileTree(dir: 'libs', include: ['*.jar'])
//support
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// database
implementation 'androidx.room:room-rxjava2:2.1.0'
kapt 'androidx.room:room-compiler:2.1.0'
// font
implementation "uk.co.chrisjenx:calligraphy:$rootProject.calligraphyVersion"
//viewModel and LiveData
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
// parser
implementation "com.google.code.gson:gson:$rootProject.gsonVersion"
// Dagger 2
implementation 'com.google.dagger:dagger-android-support:2.17'
implementation 'com.google.dagger:dagger:2.17'
kapt "com.google.dagger:dagger-compiler:2.17"
kapt "com.google.dagger:dagger-android-processor:2.17"
// network
implementation "com.amitshekhar.android:rx2-android-networking:$rootProject.rx2FastAndroidNetworking"
// reactive
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjava2Version"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroidVersion"
//htttp
implementation('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
implementation 'org.apache.httpcomponents:httpclient-android:4.3.5'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'org.jetbrains:annotations:15.0'
}