“注意:配置保留入口点..,但不是描述符类”错误?

Posted

技术标签:

【中文标题】“注意:配置保留入口点..,但不是描述符类”错误?【英文标题】:"Note: the configuration keeps the entry point.. , but not the descriptor class" error? 【发布时间】:2016-12-28 14:55:22 【问题描述】:

当我启用 Proguard 时会发生这种情况。

我的堆栈跟踪如下:

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

【问题讨论】:

【参考方案1】:

我的 gradle 构建中的这一行引起了问题。我实际上不需要它,所以我删除了它,现在一切正常。

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

如果我要使用 firebase 客户端,我会为它提供 progaurd 规则。

还有 我不需要某些 firebase 功能的 proguard 规则,例如:

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

这些功能的其余部分,您可以在此链接中找到: https://firebase.google.com/docs/android/setup

【讨论】:

对于 Firebase 2.x this answer 为 Proguard 规则提供了一个很好的起点。对于 Firebase 3.x,SDK 中包含 Proguard 规则。 @FrankvanPuffelen 是否意味着我们在使用带有 google play 服务的 firebase 9.4.0 版时不需要担心 proguard?但是,我仍然遇到同样的错误。 firebase.google.com/docs/android/setup 。您将在页面底部看到一些不需要 proguard 规则的 firebase 功能库。 适用于 'com.firebase:firebase-client-android:2.3.1' 也可能适用于谷歌播放服务,是的,你需要。

以上是关于“注意:配置保留入口点..,但不是描述符类”错误?的主要内容,如果未能解决你的问题,请参考以下文章

Pig 安装错误:错误 pig.Main:错误 2998:未处理的内部错误

Informix 错误:发生了语法错误。错误代码:-201

我收到一个错误:“MetaMask - RPC 错误:错误:错误:[ethjs-rpc] rpc 错误与有效负载”

错误精灵错误跟踪器错误

网页打开显示错误500是啥意思

PHP错误处理