buzolive
New Member
i am generating signed apk to uploading on play store but i am getting this error on generate in android studio.....
Type com.google.gson.ExclusionStrategy is defined multiple times...
this is my gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.lgt.buzo_live"
minSdkVersion 26
targetSdkVersion 30
versionCode 4
versionName "1.2"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
/*dexOptions {
javaMaxHeapSize "4g"
}*/
dexOptions {
preDexLibraries = false
}
aaptOptions { cruncherEnabled = false }
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
dataBinding {
enabled = true
}
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
applicationVariants.all { variant ->
// Return compile configuration objects of a variant.
variant.getCompileConfiguration().resolutionStrategy {
// Use Gradle's ResolutionStrategy API
// to customize how this variant resolves dependencies.
}
// Return runtime configuration objects of a variant.
variant.getRuntimeConfiguration().resolutionStrategy {
}
// Return annotation processor configuration of a variant.
variant.getAnnotationProcessorConfiguration().resolutionStrategy {
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.google.android.gmslay-services-auth-api-phone:17.5.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.21'
implementation 'com.xw.repo:bubbleseekbar:3.20'
//camera
api 'com.otaliastudios:cameraview:2.6.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
// Retrofit & OkHttp
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'
implementation 'com.squareup.okhttpkhttp:2.7.5'
// Retrofit & OkHttp
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
implementation 'com.github.angads25:toggle:1.1.0'
implementation 'net.alhazmy13.MediaPicker:libary:2.4.4'
implementation 'com.danikula:videocache:2.7.1'
// implementation 'com.github.bkhezry.android-image-picker:imagepicker:1.4.0'
implementation 'com.firebaseui:firebase-ui-database:4.2.0'
implementation 'com.google.android.gmslay-services-auth:18.1.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.google.firebase:firebase-auth:'
implementation 'com.google.firebase:firebase-database:'
implementation 'com.google.firebase:firebase-storage:'
implementation 'com.google.firebase:firebase-firestore:'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//volley
implementation 'com.android.volley:volley:1.1.1'
//
// implementation project(path: ':wcs-android-sdk-1.1.0.13-release', transitive: false)
implementation project(path: ':wcs-android-sdk-1.1.0.13-release')
implementation 'com.trafi:anchor-bottom-sheet-behavior:0.13-alpha'
//like
implementation 'com.github.jd-alexander:LikeButton:0.2.3'
//
implementation 'com.github.f0ris.sweetalert:library:1.5.1'
implementation 'com.github.chrisbaneshotoView:2.3.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:6.3.0'
implementation 'androidx.pagingaging-runtime:2.1.2'
implementation 'gun0912.ted:tedpermission:2.2.3'
//country picker
implementation 'com.github.yesterselga:country-picker-android:1.0'
implementation 'com.github.florent37:viewanimator:1.1.0'
//crashlystics
// Recommended: Add the Firebase SDK for Google Analytics.
implementation 'com.google.firebase:firebase-analytics:'
// Add the Firebase Crashlytics NDK dependency.
implementation 'com.google.firebase:firebase-crashlytics-ndk:17.2.2'
// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
//
//crop image
implementation platform('com.google.firebase:firebase-bom:26.0.0')
implementation 'com.github.mike14u:croperino:1.1.8'
implementation 'com.google.firebase:firebase-messaging:'
implementation 'com.iceteck.silicompressorr:silicompressor:2.2.4'
implementation 'com.github.smarteist:autoimageslider:1.3.2-appcompat'
implementation 'com.makeramen:roundedimageview:2.3.0'
}
Type com.google.gson.ExclusionStrategy is defined multiple times...
this is my gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.lgt.buzo_live"
minSdkVersion 26
targetSdkVersion 30
versionCode 4
versionName "1.2"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
/*dexOptions {
javaMaxHeapSize "4g"
}*/
dexOptions {
preDexLibraries = false
}
aaptOptions { cruncherEnabled = false }
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
dataBinding {
enabled = true
}
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
applicationVariants.all { variant ->
// Return compile configuration objects of a variant.
variant.getCompileConfiguration().resolutionStrategy {
// Use Gradle's ResolutionStrategy API
// to customize how this variant resolves dependencies.
}
// Return runtime configuration objects of a variant.
variant.getRuntimeConfiguration().resolutionStrategy {
}
// Return annotation processor configuration of a variant.
variant.getAnnotationProcessorConfiguration().resolutionStrategy {
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.google.android.gmslay-services-auth-api-phone:17.5.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.21'
implementation 'com.xw.repo:bubbleseekbar:3.20'
//camera
api 'com.otaliastudios:cameraview:2.6.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
// Retrofit & OkHttp
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'
implementation 'com.squareup.okhttpkhttp:2.7.5'
// Retrofit & OkHttp
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
implementation 'com.github.angads25:toggle:1.1.0'
implementation 'net.alhazmy13.MediaPicker:libary:2.4.4'
implementation 'com.danikula:videocache:2.7.1'
// implementation 'com.github.bkhezry.android-image-picker:imagepicker:1.4.0'
implementation 'com.firebaseui:firebase-ui-database:4.2.0'
implementation 'com.google.android.gmslay-services-auth:18.1.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.google.firebase:firebase-auth:'
implementation 'com.google.firebase:firebase-database:'
implementation 'com.google.firebase:firebase-storage:'
implementation 'com.google.firebase:firebase-firestore:'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//volley
implementation 'com.android.volley:volley:1.1.1'
//
// implementation project(path: ':wcs-android-sdk-1.1.0.13-release', transitive: false)
implementation project(path: ':wcs-android-sdk-1.1.0.13-release')
implementation 'com.trafi:anchor-bottom-sheet-behavior:0.13-alpha'
//like
implementation 'com.github.jd-alexander:LikeButton:0.2.3'
//
implementation 'com.github.f0ris.sweetalert:library:1.5.1'
implementation 'com.github.chrisbaneshotoView:2.3.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:6.3.0'
implementation 'androidx.pagingaging-runtime:2.1.2'
implementation 'gun0912.ted:tedpermission:2.2.3'
//country picker
implementation 'com.github.yesterselga:country-picker-android:1.0'
implementation 'com.github.florent37:viewanimator:1.1.0'
//crashlystics
// Recommended: Add the Firebase SDK for Google Analytics.
implementation 'com.google.firebase:firebase-analytics:'
// Add the Firebase Crashlytics NDK dependency.
implementation 'com.google.firebase:firebase-crashlytics-ndk:17.2.2'
// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
//
//crop image
implementation platform('com.google.firebase:firebase-bom:26.0.0')
implementation 'com.github.mike14u:croperino:1.1.8'
implementation 'com.google.firebase:firebase-messaging:'
implementation 'com.iceteck.silicompressorr:silicompressor:2.2.4'
implementation 'com.github.smarteist:autoimageslider:1.3.2-appcompat'
implementation 'com.makeramen:roundedimageview:2.3.0'
}
Attachments
-
13.2 KB Views: 299