Skip to content

Instantly share code, notes, and snippets.

@jobayer
Last active May 24, 2020 05:25
Show Gist options
  • Save jobayer/18f6d0b932001b0e223f20fa50f7f15a to your computer and use it in GitHub Desktop.
Save jobayer/18f6d0b932001b0e223f20fa50f7f15a to your computer and use it in GitHub Desktop.
Problem fixed build.gradle file for Guava duplicate class conflict
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.sagor.earnmoneywatchingvideos"
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.3"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
// Added this block
configurations {
implementation.exclude module:'gauva-jdk5'
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-analytics:17.4.1'
implementation 'com.google.firebase:firebase-auth:19.3.1'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'com.google.android.material:material:1.2.0-alpha06'
implementation 'io.paperdb:paperdb:2.7.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-firestore-ktx:21.4.3'
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.5'
implementation 'com.github.droibit.customtabslauncher:launcher-kotlin:1.4.0'
implementation 'com.startapp:inapp-sdk:4.5.0'
// Added this block
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation 'com.google.guava:guava:26.0-android'
implementation 'pub.devrel:easypermissions:0.3.0'
implementation ('com.google.api-client:google-api-client-android:1.22.0') {
exclude group: 'org.apache.httpcomponents'
// Added this line
exclude group:'com.google.guava'
}
implementation ('com.google.apis:google-api-services-youtube:v3-rev183-1.22.0') {
exclude group: 'org.apache.httpcomponents'
// Added this line
exclude group:'com.google.guava'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment