1

I have upgraded my project to latest version of Google Play Services, including Firebase (version 11.0.0) and I am not able to build the project anymore due to conflict between Guava's and Firebase's version of the class com/google/common/base/FinalizableReference.class

At previous version Firebase it did not contain com/google/common/base/FinalizableReference.class

I have the following build grade:

android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
    applicationId "com.example.app.myapplication"
    minSdkVersion 19
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}
buildTypes {
    debug {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-android-optimize.txt'
    }
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-android-optimize.txt'
    }
}

lintOptions {
    abortOnError false
}
}dependencies {
    compile ('com.google.firebase:firebase-core:11.0.0')
    compile ('com.google.guava:guava:22.0-android')
}

and the proguard-android-optimize.txt file is

-verbose
-dontoptimize
-ignorewarnings
-dontshrink
-dontwarn com.google.common.**
-dontwarn com.google.android.gms.**
-dontwarn javax.lang.model.element.**

-dontwarn com.google.common.base.FinalizableReference
-keep class com.google.common.base.FinalizableReference

-dontwarn com.google.common.base.internal.Finalizer
-keep class com.google.common.base.internal.Finalizer

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
AL.
  • 36,815
  • 10
  • 142
  • 281
Roman
  • 13
  • 3
  • Possible duplicate of [Several new Proguard issues Google Play services v10.2.6 to v11.0.0 in a Multidex project](https://stackoverflow.com/questions/44461049/several-new-proguard-issues-google-play-services-v10-2-6-to-v11-0-0-in-a-multide) – iMobaio Jul 02 '17 at 20:44

1 Answers1

0

A Google employee on GitHub has acknowledged the problem and says a fix is in the works.

Personally I believe this to be a bug and not just with with a Guava dependency declared. I've had to roll back Play Services to 10.2.6 in the mean time.

For your reference - Response to this on GitHub

meet2x4
  • 16
  • 1