1

I am trying to integrate the firebase perf in Android. Below are my dependencies.When i tried to run the build, it gives me error "Can't find common super class of [com/google/android/gms/internal/zzata] (with 1 known super classes) and [java/lang/String] (with 2 known super classes)"

classpath 'com.google.gms:google-services:4.1.0'
#############
implementation "com.google.android.gms:play-services:12.0.1"
implementation "com.google.android.gms:play-services-ads:15.0.1"
implementation "com.google.android.gms:play-services-auth:16.0.0"
implementation "com.google.android.gms:play-services-gcm:15.0.1"
implementation "com.google.firebase:firebase-core:16.0.3"
implementation 'com.google.firebase:firebase-perf:16.1.0'
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
ketan muttha
  • 296
  • 2
  • 7
  • 1
    I think you should remove `implementation "com.google.android.gms:play-services:12.0.1"`, as it has included the dependencies below(ads-auth-gcm) – Chanh Sep 27 '18 at 02:10

2 Answers2

1

I think this is caused by mixing

implementation "com.google.android.gms:play-services:12.0.1"

With the rest of your 15.0.0 and up dependencies. This is causing duplicate definitions of certain symbols in the libraries, which manifests itself in many ways, in this instance by saying it can't find the super class of a particular obfuscated class, because it is likely the sub-class and super class come from conflicting definitions of a library.

1.) play-services:12.0.1 is an alias target, which will pull in the 12.0.1 version of all play-services-* and firebase-* libraries, likely not what you want.

2.) Only Google Play services library versions after 15.0.0 can have different versions. See https://developers.google.com/android/guides/versioning for more details.

zfromg
  • 170
  • 9
0

you are lacking play-services-base (which is that super class for the others):

// implementation "com.google.android.gms:play-services:12.0.1"
implementation "com.google.android.gms:play-services-base:15.0.1"
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • Thanks Martin for your reply. It is still giving the same error. sometimes, it might need to do with progaurd, guessing. – ketan muttha Sep 26 '18 at 20:06
  • @ketanmuttha, did you try this suggestion by also commenting out implementation "com.google.android.gms:play-services:12.0.1" as suggested? You shouldn't need to explicitly include play-services-base since the other libraries listed should have a POM-level dependency onto play-services-base, automatically pulling in the right dependent version. – zfromg Sep 27 '18 at 01:58
  • @zfromg think this isn't the case anymore, since the new versioning.... while the dependency to the library at version `12.0.1` has to be removed (which still adds a whole bunch of further dependencies). – Martin Zeitler Sep 27 '18 at 03:01
  • @ketanmuttha try to clean the project or delete the `build` directory; because there still may be conflicting files present in the build-cache. – Martin Zeitler Sep 27 '18 at 03:07