I tried to resolve it but the problem is that we are using google dialogflow in our app
So on adding firebase Firestore dependency it is having duplicate classes in both . I tried to remove duplicate classes and also searched for solution on stack Overflow but nothing worked.
Solution referred (unsuccessful) Resolve duplicate classes with firebase and dialog-flow
i tried removing jcenter from the build.gradel but it doesn't work because it was used in the android project
iam sharing my aap level gradel file and project level gradel file
plz help
App level build.gradel
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/INDEX.LIST'
}
defaultConfig {
applicationId "com.example.cureya_chatbot"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
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'
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/library_release.kotlin_module'
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.cloud:google-cloud-dialogflow:2.1.0'
implementation 'io.grpc:grpc-okhttp:1.30.0'
// youtube video player.
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.5'
// circular imageview
implementation 'de.hdodenhof:circleimageview:3.1.0'
//progress bar
implementation 'com.sasank.roundedhorizontalprogress:roundedhorizontalprogress:1.0.1'
implementation 'com.google.android.material:material:1.5.0-alpha02'
implementation 'com.eyalbira.loadingdots:loading-dots:1.0.2'
// compile 'com.github.glomadrian:loadingballs:1.1@aar'
}
project level build.gradel
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.2"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
/* maven {
url "http://dl.bintray.com/glomadrian/maven"
}*/
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}