I am getting an error while starting the application in android studio.
the error i got; AGPBI: {"kind":"error","text":"java.lang.IllegalArgumentException","sources":[{}],"tool":"D8"}
Task :app:desugarDebugFileDependencies FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:desugarDebugFileDependencies'.
A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction Error while dexing.
Build Gradle app;
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id("androidx.navigation.safeargs")
//id 'kotlin-android-extensions'
}
android {
compileSdk 31
defaultConfig {
applicationId "com.maden.kuryeapp_v2"
minSdk 23
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
main.jniLibs.srcDirs = ['libs']
test.jniLibs.srcDirs = ['libs']
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
dataBinding {
enabled = true
}
buildFeatures {
viewBinding = true
}
buildFeatures {
dataBinding true
}
productFlavors { }
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
//Fragment
def nav_version = "2.3.5"
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")
implementation("androidx.navigation:navigation-ui-ktx:$nav_version")
//Picasso & Glide
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
//Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3")
implementation("androidx.core:core-ktx:1.6.0")
//Others
implementation "de.hdodenhof:circleimageview:3.1.0"
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.69'
implementation("com.google.guava:guava:30.1.1-android")
// RxJava
implementation 'io.reactivex.rxjava3:rxjava:3.0.0'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
// Okhttp3 for the POST requests
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
implementation 'org.apache.httpcomponents:httpcore:4.4.10'
implementation 'org.apache.httpcomponents:httpclient:4.5.6'
//Google
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.akexorcist:googledirectionlibrary:1.0.4'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.google.android.gms:play-services-drive:17.0.0'
implementation 'com.google.android.gms:play-services-auth-base:17.1.4'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-storage:20.0.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.auth0.android:jwtdecode:2.0.0'
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.3.0'
implementation 'com.google.mlkit:language-id:16.1.1'
implementation 'net.gotev:speech:1.6.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.1'
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: ['*mock*.jar'])
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation project(path: ':cropper')
implementation project(path: ':hbrecorder')
//implementation project(path: ':hbrecorder')
//tckk
implementation files('libs/ekds/tckkapi-operational-basic-2.13.1.jar')
implementation files('libs/ekds/tckkapi-interfaces-2.13.jar')
implementation files('libs/ekds/log4j-1.2.16.jar')
implementation fileTree(dir: 'libs/esya', include: ['*.jar'])
implementation files('libs/pdf/ADDLTV.jar')
implementation 'jp.wasabeef:blurry:2.1.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'org.jmrtd:jmrtd:0.7.18' // nfc kodu
implementation 'net.sf.scuba:scuba-sc-android:0.0.20'
implementation 'edu.ucar:jj2000:5.2'
implementation 'com.github.mhshams:jnbis:1.1.0'
//Camera
implementation 'androidx.camera:camera-camera2:1.1.0-alpha08'
}
Build Gradle module;
buildscript {
ext.kotlin_version = '1.5.20-RC'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
def nav_version = "2.3.5"
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version")
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}