Search code examples
androidfirebaseproguardbuild.gradleandroid-proguard

"Note: the configuration keeps the entry point.. , but not the descriptor class" error?


This happens when I enable Proguard.

My stacktrace is as follows:

Note: com.fasterxml.jackson.core.type.TypeReference calls 'Class.getGenericSuperclass' Note: com.fasterxml.jackson.databind.introspect.AnnotatedField calls 'Field.getGenericType' Note: com.fasterxml.jackson.databind.introspect.AnnotatedField calls 'Field.getType' Note: com.fasterxml.jackson.databind.introspect.AnnotatedMethod calls 'Method.getGenericReturnType' Note: com.fasterxml.jackson.databind.introspect.AnnotatedMethod calls 'Method.getTypeParameters' Note: com.fasterxml.jackson.databind.introspect.AnnotatedMethod calls 'Method.getGenericParameterTypes' Note: com.fasterxml.jackson.databind.ser.BeanPropertyWriter calls 'Field.getType' Note: com.fasterxml.jackson.databind.ser.BeanPropertyWriter calls 'Method.getGenericReturnType' Note: com.fasterxml.jackson.databind.ser.BeanPropertyWriter calls 'Field.getGenericType' Note: com.fasterxml.jackson.databind.ser.std.JsonValueSerializer calls 'Method.getGenericReturnType' Note: com.fasterxml.jackson.databind.type.TypeBindings calls 'Class.getTypeParameters' Note: com.fasterxml.jackson.databind.type.TypeBindings calls 'Class.getGenericSuperclass' Note: com.fasterxml.jackson.databind.type.TypeBindings calls 'Class.getGenericInterfaces' Note: com.fasterxml.jackson.databind.type.TypeFactory calls 'Class.getTypeParameters' Note: com.fasterxml.jackson.databind.type.TypeFactory calls 'Class.getGenericSuperclass' Note: com.fasterxml.jackson.databind.type.TypeFactory calls 'Class.getGenericInterfaces' Note: com.fasterxml.jackson.databind.util.ClassUtil$EnumTypeLocator calls 'Field.getType' Note: com.google.android.gms.internal.zzano calls 'Class.getGenericInterfaces' Note: com.google.android.gms.internal.zzano calls 'Class.getGenericSuperclass' Note: com.google.android.gms.internal.zzano calls 'Class.getTypeParameters' Note: com.google.android.gms.internal.zzanq calls 'Field.getType' Note: com.google.android.gms.internal.zzaog calls 'Class.getGenericSuperclass' Note: com.google.android.gms.internal.zzaog calls 'Field.getGenericType' Note: com.google.android.gms.internal.zzaog calls 'Field.getType' Note: com.google.android.gms.internal.zzaol calls 'Class.getGenericSuperclass' Note: com.google.android.gms.internal.zzapw calls 'Field.getType' Note: com.nineoldandroids.util.ReflectiveProperty calls 'Field.getType' Note: processing.data.Table calls 'Field.getType' Note: com.fasterxml.jackson.databind.type.TypeBindings calls 'Class.getEnclosingClass' Note: com.fasterxml.jackson.databind.type.TypeBindings calls 'Class.getDeclaringClass' Note: com.fasterxml.jackson.databind.util.ClassUtil calls 'Class.getEnclosingClass' Note: com.google.android.gms.internal.zzano$zzb calls 'Class.getEnclosingClass' Note: processing.data.Table calls 'Class.getEnclosingClass' Note: com.fasterxml.jackson.databind.util.ClassUtil calls 'Class.getEnclosingMethod' Warning:com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Note: com.google.android.gms.internal.zzanx: can't find dynamically referenced class sun.misc.Unsafe Note: com.google.android.gms.internal.zzanx accesses a declared field 'theUnsafe' dynamically Note: com.google.android.gms.internal.zzsb accesses a declared field 'MODULE_ID' dynamically
      Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite.ModuleDescriptor { java.lang.String MODULE_ID; }'
      Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { java.lang.String MODULE_ID; }' Note: com.google.android.gms.internal.zzsb accesses a declared field 'MODULE_VERSION' dynamically
      Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite.ModuleDescriptor { int MODULE_VERSION; }'
      Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { int MODULE_VERSION; }' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { com.google.android.gms.ads.AdRequest zza(android.content.Context,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestBannerAd(android.content.Context,com.google.android.gms.ads.mediation.MediationBannerListener,android.os.Bundle,com.google.android.gms.ads.AdSize,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationBannerListener' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestBannerAd(android.content.Context,com.google.android.gms.ads.mediation.MediationBannerListener,android.os.Bundle,com.google.android.gms.ads.AdSize,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.AdSize' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestBannerAd(android.content.Context,com.google.android.gms.ads.mediation.MediationBannerListener,android.os.Bundle,com.google.android.gms.ads.AdSize,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestInterstitialAd(android.content.Context,com.google.android.gms.ads.mediation.MediationInterstitialListener,android.os.Bundle,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationInterstitialListener' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestInterstitialAd(android.content.Context,com.google.android.gms.ads.mediation.MediationInterstitialListener,android.os.Bundle,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestNativeAd(android.content.Context,com.google.android.gms.ads.mediation.MediationNativeListener,android.os.Bundle,com.google.android.gms.ads.mediation.NativeMediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationNativeListener' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void requestNativeAd(android.content.Context,com.google.android.gms.ads.mediation.MediationNativeListener,android.os.Bundle,com.google.android.gms.ads.mediation.NativeMediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.NativeMediationAdRequest' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void initialize(android.content.Context,com.google.android.gms.ads.mediation.MediationAdRequest,java.lang.String,com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdListener,android.os.Bundle,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void initialize(android.content.Context,com.google.android.gms.ads.mediation.MediationAdRequest,java.lang.String,com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdListener,android.os.Bundle,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdListener' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { void loadAd(com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdListener zza(com.google.ads.mediation.AbstractAdViewAdapter); }', but not the descriptor class 'com.google.ads.mediation.AbstractAdViewAdapter' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { com.google.android.gms.ads.InterstitialAd zza(com.google.ads.mediation.AbstractAdViewAdapter,com.google.android.gms.ads.InterstitialAd); }', but not the descriptor class 'com.google.ads.mediation.AbstractAdViewAdapter' Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { com.google.android.gms.ads.InterstitialAd zza(com.google.ads.mediation.AbstractAdViewAdapter,com.google.android.gms.ads.InterstitialAd); }', but not the descriptor class 'com.google.android.gms.ads.InterstitialAd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.doubleclick.PublisherAdView { void setAdSizes(com.google.android.gms.ads.AdSize[]); }', but not the descriptor class 'com.google.android.gms.ads.AdSize' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzu createBannerAdManager(com.google.android.gms.dynamic.zzd,com.google.android.gms.ads.internal.client.AdSizeParcel,java.lang.String,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzu createBannerAdManager(com.google.android.gms.dynamic.zzd,com.google.android.gms.ads.internal.client.AdSizeParcel,java.lang.String,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.internal.zzgj' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzu createSearchAdManager(com.google.android.gms.dynamic.zzd,com.google.android.gms.ads.internal.client.AdSizeParcel,java.lang.String,int); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzu createInterstitialAdManager(com.google.android.gms.dynamic.zzd,com.google.android.gms.ads.internal.client.AdSizeParcel,java.lang.String,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzu createInterstitialAdManager(com.google.android.gms.dynamic.zzd,com.google.android.gms.ads.internal.client.AdSizeParcel,java.lang.String,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.internal.zzgj' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzs createAdLoaderBuilder(com.google.android.gms.dynamic.zzd,java.lang.String,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzs createAdLoaderBuilder(com.google.android.gms.dynamic.zzd,java.lang.String,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.internal.zzgj' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzz getMobileAdsSettingsManager(com.google.android.gms.dynamic.zzd); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.client.zzz getMobileAdsSettingsManagerWithClientJarVersion(com.google.android.gms.dynamic.zzd,int); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.internal.zzdt createNativeAdViewDelegate(com.google.android.gms.dynamic.zzd,com.google.android.gms.dynamic.zzd); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.internal.zzdt createNativeAdViewDelegate(com.google.android.gms.dynamic.zzd,com.google.android.gms.dynamic.zzd); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.reward.client.zzb createRewardedVideoAd(com.google.android.gms.dynamic.zzd,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.ads.internal.reward.client.zzb createRewardedVideoAd(com.google.android.gms.dynamic.zzd,com.google.android.gms.internal.zzgj,int); }', but not the descriptor class 'com.google.android.gms.internal.zzgj' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.internal.zzhp createInAppPurchaseManager(com.google.android.gms.dynamic.zzd); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.ads.internal.ClientApi { com.google.android.gms.internal.zzhi createAdOverlay(com.google.android.gms.dynamic.zzd); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.android.gms.flags.impl.FlagProviderImpl { void init(com.google.android.gms.dynamic.zzd); }', but not the descriptor class 'com.google.android.gms.dynamic.zzd' Note: the configuration keeps the entry point 'com.google.firebase.crash.FirebaseCrash { com.google.firebase.crash.FirebaseCrash getInstance(com.google.firebase.FirebaseApp); }', but not the descriptor class 'com.google.firebase.FirebaseApp' Note: the configuration keeps the entry point 'com.google.firebase.iid.FirebaseInstanceId { com.google.firebase.iid.FirebaseInstanceId getInstance(com.google.firebase.FirebaseApp); }', but not the descriptor class 'com.google.firebase.FirebaseApp' Note: there were 1 references to unknown classes.
      You should check your configuration for typos.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) Note: there were 28 classes trying to access generic signatures using reflection.
      You should consider keeping the signature attributes
      (using '-keepattributes Signature').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) Note: there were 5 classes trying to access enclosing classes using reflection.
      You should consider keeping the inner classes attributes
      (using '-keepattributes InnerClasses').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) Note: there were 1 classes trying to access enclosing methods using reflection.
      You should consider keeping the enclosing method attributes
      (using '-keepattributes InnerClasses,EnclosingMethod').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) Note: there were 33 unkept descriptor classes in kept class members.
      You should consider explicitly keeping the mentioned classes
      (using '-keep').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass) Note: there were 1 unresolved dynamic references to classes or interfaces.
      You should check if you need to specify additional program jars.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) Note: there were 3 accesses to class members by means of introspection.
      You should consider explicitly keeping the mentioned class members
      (using '-keep' or '-keepclassmembers').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember) Warning:there were 4 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. :app:transformClassesAndResourcesWithProguardForDebug FAILED Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'.
> java.io.IOException: Please correct the above warnings first. Information:BUILD FAILED Information:Total time: 8.882 secs Information:1 error Information:3 warnings Information:See complete output in console

Solution

  • This line in my gradle build was causing problem.I actually dont need it ,and so i removed it ,and everything works well now.

    "compile 'com.firebase:firebase-client-android:2.3.1'"
    

    if i were to use firebase client ,i would have provided progaurd rules for it.

    Also I do not need proguard rules for some of the firebase featues such as:

    com.google.firebase:firebase-core:9.4.0,
    com.google.firebase:firebase-crash:9.4.0,
    com.google.firebase:firebase-config:9.4.0
    

    Rest of those features, you will find on this link: https://firebase.google.com/docs/android/setup