以下是启用ProGuard后看到的错误,我正在使用easyAR,apoographographcool库。
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: there were 11 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Initializing...
Note: the configuration refers to the unknown class 'com.google.android.gms.common.api.internal.BasePendingResult$ReleasableResultGuardian'
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced method 'void createNotificationChannel(android.app.NotificationChannel)' in library class android.app.NotificationManager
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced method 'android.app.NotificationChannel getNotificationChannel(java.lang.String)' in library class android.app.NotificationManager
Warning: com.google.android.gms.common.wrappers.InstantApps: can't find referenced method 'boolean isInstantApp()' in library class android.content.pm.PackageManager
Warning: com.google.android.gms.common.wrappers.PackageManagerWrapper: can't find referenced method 'boolean isInstantApp(java.lang.String)' in library class android.content.pm.PackageManager
Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Note: com.crashlytics.android.core.CrashlyticsController: can't find dynamically referenced class com.google.firebase.crash.FirebaseCrash
Note: com.google.android.gms.common.util.WorkSourceUtil: can't find dynamically referenced class android.os.WorkSource$WorkChain
Note: com.google.android.gms.internal.clearcut.zzaw: can't find dynamically referenced class libcore.io.Memory
Note: com.google.android.gms.internal.clearcut.zzaw: can't find dynamically referenced class org.robolectric.Robolectric
Note: com.google.android.gms.internal.clearcut.zzbs: can't find dynamically referenced class com.google.protobuf.ExtensionRegistry
Note: com.google.android.gms.internal.clearcut.zzbt: can't find dynamically referenced class com.google.protobuf.Extension
Note: com.google.android.gms.internal.clearcut.zzbx: can't find dynamically referenced class com.google.protobuf.ExtensionSchemaFull
Note: com.google.android.gms.internal.clearcut.zzdd: can't find dynamically referenced class com.google.protobuf.DescriptorMessageInfoFactory
Note: com.google.android.gms.internal.clearcut.zzdl: can't find dynamically referenced class com.google.protobuf.MapFieldSchemaFull
Note: com.google.android.gms.internal.clearcut.zzdy: can't find dynamically referenced class com.google.protobuf.NewInstanceSchemaFull
Note: com.google.android.gms.internal.clearcut.zzeh: can't find dynamically referenced class com.google.protobuf.GeneratedMessage
Note: com.google.android.gms.internal.clearcut.zzeh: can't find dynamically referenced class com.google.protobuf.UnknownFieldSetSchema
Note: com.google.android.gms.internal.measurement.zztb: can't find dynamically referenced class libcore.io.Memory
Note: com.google.android.gms.internal.measurement.zztb: can't find dynamically referenced class org.robolectric.Robolectric
Note: com.google.android.gms.internal.measurement.zzua: can't find dynamically referenced class com.google.protobuf.ExtensionRegistry
Note: com.google.android.gms.internal.measurement.zzub: can't find dynamically referenced class com.google.protobuf.Extension
Note: com.google.android.gms.internal.measurement.zzue: can't find dynamically referenced class com.google.protobuf.ExtensionSchemaFull
Note: com.google.android.gms.internal.measurement.zzvk: can't find dynamically referenced class com.google.protobuf.DescriptorMessageInfoFactory
Note: com.google.android.gms.internal.measurement.zzvs: can't find dynamically referenced class com.google.protobuf.MapFieldSchemaFull
Note: com.google.android.gms.internal.measurement.zzwe: can't find dynamically referenced class com.google.protobuf.NewInstanceSchemaFull
Note: com.google.android.gms.internal.measurement.zzwn: can't find dynamically referenced class com.google.protobuf.GeneratedMessage
Note: com.google.android.gms.internal.measurement.zzwn: can't find dynamically referenced class com.google.protobuf.UnknownFieldSetSchema
Note: com.google.android.gms.internal.vision.zzeg: can't find dynamically referenced class libcore.io.Memory
Note: com.google.android.gms.internal.vision.zzeg: can't find dynamically referenced class org.robolectric.Robolectric
Note: com.google.android.gms.internal.vision.zzfj: can't find dynamically referenced class com.google.protobuf.ExtensionRegistry
Note: com.google.android.gms.internal.vision.zzfk: can't find dynamically referenced class com.google.protobuf.Extension
Note: com.google.android.gms.internal.vision.zzfo: can't find dynamically referenced class com.google.protobuf.ExtensionSchemaFull
Note: com.google.android.gms.internal.vision.zzgu: can't find dynamically referenced class com.google.protobuf.DescriptorMessageInfoFactory
Note: com.google.android.gms.internal.vision.zzhc: can't find dynamically referenced class com.google.protobuf.MapFieldSchemaFull
Note: com.google.android.gms.internal.vision.zzhp: can't find dynamically referenced class com.google.protobuf.NewInstanceSchemaFull
Note: com.google.android.gms.internal.vision.zzhy: can't find dynamically referenced class com.google.protobuf.GeneratedMessage
Note: com.google.android.gms.internal.vision.zzhy: can't find dynamically referenced class com.google.protobuf.UnknownFieldSetSchema
Note: com.google.android.gms.measurement.internal.zzda: can't find dynamically referenced class com.google.android.gms.tagmanager.TagManagerService
Note: com.google.android.gms.measurement.internal.zzq: can't find dynamically referenced class android.os.SystemProperties
Note: com.google.firebase.iid.FirebaseInstanceId$zza: can't find dynamically referenced class com.google.firebase.messaging.FirebaseMessaging
Note: com.squareup.moshi.ClassFactory: can't find dynamically referenced class sun.misc.Unsafe
Note: io.fabric.sdk.android.FabricKitsFinder: can't find dynamically referenced class com.google.android.gms.ads.AdView
Note: okhttp3.internal.platform.AndroidPlatform: can't find dynamically referenced class com.android.org.conscrypt.SSLParametersImpl
Note: okhttp3.internal.platform.AndroidPlatform: can't find dynamically referenced class org.apache.harmony.xnet.provider.jsse.SSLParametersImpl
Note: okhttp3.internal.platform.AndroidPlatform$CloseGuard: can't find dynamically referenced class dalvik.system.CloseGuard
Note: okhttp3.internal.platform.Platform: can't find dynamically referenced class sun.security.ssl.SSLContextImpl
Note: the configuration refers to the unknown field 'com.google.android.gms.common.api.internal.BasePendingResult$ReleasableResultGuardian mResultGuardian' in class 'com.google.android.gms.common.api.internal.BasePendingResult'
Note: the configuration refers to the unknown method 'com.google.android.gms.measurement.AppMeasurement getInstance(android.content.Context,java.lang.String,java.lang.String)' in class 'com.google.android.gms.measurement.AppMeasurement'
Note: the configuration keeps the entry point 'cn.easyar.CameraDevice { void requestPermissions(cn.easyar.FunctorOfVoidFromPermissionStatusAndString); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromPermissionStatusAndString'
Note: the configuration keeps the entry point 'cn.easyar.CameraDevice { boolean setSize(cn.easyar.Vec2I); }', but not the descriptor class 'cn.easyar.Vec2I'
Note: the configuration keeps the entry point 'cn.easyar.CloudRecognizer { void open(java.lang.String,java.lang.String,java.lang.String,cn.easyar.FunctorOfVoidFromCloudStatus,cn.easyar.FunctorOfVoidFromCloudStatusAndListOfPointerOfTarget); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromCloudStatus'
Note: the configuration keeps the entry point 'cn.easyar.CloudRecognizer { void open(java.lang.String,java.lang.String,java.lang.String,cn.easyar.FunctorOfVoidFromCloudStatus,cn.easyar.FunctorOfVoidFromCloudStatusAndListOfPointerOfTarget); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromCloudStatusAndListOfPointerOfTarget'
Note: the configuration keeps the entry point 'cn.easyar.ImageTarget { boolean setSize(cn.easyar.Vec2F); }', but not the descriptor class 'cn.easyar.Vec2F'
Note: the configuration keeps the entry point 'cn.easyar.ImageTracker { void loadTarget(cn.easyar.Target,cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool'
Note: the configuration keeps the entry point 'cn.easyar.ImageTracker { void unloadTarget(cn.easyar.Target,cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool'
Note: the configuration keeps the entry point 'cn.easyar.Renderer { boolean render(cn.easyar.Drawable,cn.easyar.Vec4I); }', but not the descriptor class 'cn.easyar.Drawable'
Note: the configuration keeps the entry point 'cn.easyar.Renderer { boolean render(cn.easyar.Drawable,cn.easyar.Vec4I); }', but not the descriptor class 'cn.easyar.Vec4I'
Note: the configuration keeps the entry point 'cn.easyar.Renderer { boolean renderToTexture(cn.easyar.Drawable,long); }', but not the descriptor class 'cn.easyar.Drawable'
Note: the configuration keeps the entry point 'cn.easyar.Renderer { boolean renderErrorMessage(cn.easyar.Vec4I); }', but not the descriptor class 'cn.easyar.Vec4I'
Note: the configuration keeps the entry point 'cn.easyar.TargetTracker { void loadTarget(cn.easyar.Target,cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool'
Note: the configuration keeps the entry point 'cn.easyar.TargetTracker { void unloadTarget(cn.easyar.Target,cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromPointerOfTargetAndBool'
Note: the configuration keeps the entry point 'cn.easyar.VideoPlayer { void open(java.lang.String,int,cn.easyar.FunctorOfVoidFromVideoStatus); }', but not the descriptor class 'cn.easyar.FunctorOfVoidFromVideoStatus'
Note: the configuration keeps the entry point 'com.airbnb.lottie.LottieAnimationView { void setComposition(com.airbnb.lottie.LottieComposition); }', but not the descriptor class 'com.airbnb.lottie.LottieComposition'
Note: the configuration keeps the entry point 'com.airbnb.lottie.LottieAnimationView { void setImageAssetDelegate(com.airbnb.lottie.ImageAssetDelegate); }', but not the descriptor class 'com.airbnb.lottie.ImageAssetDelegate'
Note: the configuration keeps the entry point 'com.google.android.gms.ads.identifier.AdvertisingIdClient { com.google.android.gms.internal.ads_identifier.zze zza(android.content.Context,com.google.android.gms.common.BlockingServiceConnection); }', but not the descriptor class 'com.google.android.gms.common.BlockingServiceConnection'
Note: the configuration keeps the entry point 'com.google.android.gms.common.api.internal.LifecycleCallback { com.google.android.gms.common.api.internal.LifecycleFragment getChimeraLifecycleFragmentImpl(com.google.android.gms.common.api.internal.LifecycleActivity); }', but not the descriptor class 'com.google.android.gms.common.api.internal.LifecycleActivity'
Note: the configuration keeps the entry point 'com.google.android.gms.flags.impl.FlagProviderImpl { void init(com.google.android.gms.dynamic.IObjectWrapper); }', but not the descriptor class 'com.google.android.gms.dynamic.IObjectWrapper'
Note: the configuration keeps the entry point 'com.google.android.gms.vision.clearcut.DynamiteClearcutLogger { void zza(int,com.google.android.gms.internal.vision.zzdu); }', but not the descriptor class 'com.google.android.gms.internal.vision.zzdu'
Note: the configuration keeps the entry point 'com.google.android.gms.vision.clearcut.LoggingConnectionCallbacks { void onConnectionFailed(com.google.android.gms.common.ConnectionResult); }', but not the descriptor class 'com.google.android.gms.common.ConnectionResult'
Note: the configuration keeps the entry point 'com.google.android.gms.vision.clearcut.VisionClearcutLogger { void zzb(int,com.google.android.gms.internal.vision.zzdu); }', but not the descriptor class 'com.google.android.gms.internal.vision.zzdu'
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 2 references to unknown class members.
You should check your configuration for typos.
Note: there were 22 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 41 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)
Warning: there were 18 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: there were 4 unresolved references to library class members.
You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
Thread(Tasks limiter_9): destruction
:app:transformClassesAndResourcesWithProguardForDebug FAILED`enter code here`
因此在proguard-rules.pro中添加了以下规则,因此我看不到任何错误,但是在应用运行时会看到崩溃。
-dontwarn okio.**
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
下面提到的导致运行该应用程序时崩溃的错误,对于ProGuard来说我是一个新手,所以请帮助我修改ProGuard规则以解决此崩溃。
art/runtime/java_vm_ext.cc:475] JNI DETECTED ERROR IN APPLICATION: JNI GetLongField called with pending exception java.lang.NoSuchFieldError: no "J" field "cdata_" in class "Lcn/easyar/CameraFrameStreamer;" or its superclasses
art/runtime/java_vm_ext.cc:475] at boolean cn.easyar.CameraFrameStreamer.attachCamera(cn.easyar.CameraDevice) ((null):-2)
art/runtime/java_vm_ext.cc:475] at boolean com.startup.grandinvite.f.a() ((null):-1)
art/runtime/java_vm_ext.cc:475] at void com.startup.grandinvite.e.onAttachedToWindow() ((null):-1)
art/runtime/java_vm_ext.cc:475] at void android.view.View.dispatchAttachedToWindow(android.view.View$AttachInfo, int) (View.java:15535)
art/runtime/java_vm_ext.cc:475] at void android.view.ViewGroup.dispatchAttachedToWindow(android.view.View$AttachInfo, int) (ViewGroup.java:2925)
art/runtime/java_vm_ext.cc:475] at void android.view.ViewGroup.dispatchAttachedToWindow(andro