gpt4 book ai didi

android - Proguard-rules.pro 在删除 relese apk Android 中的日志时失败

转载 作者:行者123 更新时间:2023-11-30 00:31:15 24 4
gpt4 key购买 nike

   ProGuard, version 5.2.1
Note: the configuration specifies that none of the methods of class 'android.util.Log' have any side effects
: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Call
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Note: com.google.android.gms.internal.zzast: can't find dynamically referenced class android.os.SystemProperties
Note: com.squareup.picasso.Utils: can't find dynamically referenced class com.squareup.okhttp.OkHttpClient
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'MODULE_ID' dynamically
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.dynamite.DynamiteModule accesses a declared field 'MODULE_VERSION' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { int MODULE_VERSION; }'
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'sClassLoader' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader { java.lang.ClassLoader sClassLoader; }'
Note: the configuration keeps the entry point 'com.google.android.gms.ads.identifier.AdvertisingIdClient { com.google.android.gms.internal.zzcn zza(android.content.Context,com.google.android.gms.common.zza); }', but not the descriptor class 'com.google.android.gms.common.zza'
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.android.gms.measurement.AppMeasurement { void registerOnScreenChangeCallback(com.google.android.gms.measurement.AppMeasurement$zzd); }', but not the descriptor class 'com.google.android.gms.measurement.AppMeasurement$zzd'
Note: the configuration keeps the entry point 'com.google.android.gms.measurement.AppMeasurement { void unregisterOnScreenChangeCallback(com.google.android.gms.measurement.AppMeasurement$zzd); }', but not the descriptor class 'com.google.android.gms.measurement.AppMeasurement$zzd'
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: the configuration keeps the entry point 'com.sothree.slidinguppanel.SlidingUpPanelLayout { void setScrollableViewHelper(com.sothree.slidinguppanel.ScrollableViewHelper); }', but not the descriptor class 'com.sothree.slidinguppanel.ScrollableViewHelper'
Note: the configuration keeps the entry point 'com.sothree.slidinguppanel.SlidingUpPanelLayout { void setPanelState(com.sothree.slidinguppanel.SlidingUpPanelLayout$PanelState); }', but not the descriptor class 'com.sothree.slidinguppanel.SlidingUpPanelLayout$PanelState'
Note: the configuration keeps the entry point 'com.sothree.slidinguppanel.SlidingUpPanelLayout { void setPanelStateInternal(com.sothree.slidinguppanel.SlidingUpPanelLayout$PanelState); }', but not the descriptor class 'com.sothree.slidinguppanel.SlidingUpPanelLayout$PanelState'
Note: there were 2 references to unknown classes.
You should check your configuration for typos.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 3 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 8 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 2 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 318 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:transformClassesAndResourcesWithProguardForRelease FAILED
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.
Information:BUILD FAILED
Information:Total time: 4.766 secs
Information:1 error
Information:200 warnings
Information:See complete output in console


My proguard-rules.pro file is:
# Disable Android logging
-dontskipnonpubliclibraryclasses
-dontobfuscate
-forceprocessing
-optimizationpasses 5
-dontwarn okio.**
-dontwarn android.support.**
-dontnote android.support.**
-dontwarn org.apache.http.**
-dontwarn org.apache.lang.**
-dontwarn android.net.http.AndroidHttpClient
-dontwarn com.google.android.gms.**
-dontwarn com.android.volley.toolbox.**
-keepclassmembers class * implements android.os.Parcelable {
static ** CREATOR;
}
-keep class * extends android.app.Activity

-assumenosideeffects class android.util.Log {*;}

我添加了此代码以从应用程序发布的 apk 中删除日志并收到类似 IOException 的错误,在此请先更正上述警告。我不知道如何更正此警告。我引用了很多链接,但仍然无法解决。

最佳答案

你可以把这个写在proguard.pro文件中。

-dontwarn com.squareup.**
-dontnote com.squareup.**

关于android - Proguard-rules.pro 在删除 relese apk Android 中的日志时失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44299135/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com