凌空ProGuard的模糊处理后,似乎不工作 [英] Volley seems not working after ProGuard obfuscate

查看:282
本文介绍了凌空ProGuard的模糊处理后,似乎不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,它使用谷歌的排球作为我的下载经纪人。我只是想用ProGuard的混淆了code,并找出抽射下载开始在运行时出现故障。

I have an Android app which uses Google Volley as my download broker. I just tried to use ProGuard to obfuscate the code, and find out the volley download starts failing at runtime.

下面是我的ProGuard配置:

Here's my ProGuard config:

-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
-keep class com.android.volley.** { *; }
-keep interface com.android.volley.** { *; }

-keepattributes *Annotation*

-dontwarn org.apache.**

和这里是我的code看到的错误:

and here is the error I saw in the code:

Async download FAILED. Exception message: The chosen LogFactory implementation does not extend LogFactory. Please check your configuration. (Caused by java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'a.a.a.b.c'. Please check the custom implementation. Help can be found @http://commons.apache.org/logging/troubleshooting.html.)

我在想,如果我做了一些ProGuard的配置造成了一定的依赖性问题。请大家帮帮忙。

I was wondering if I did some proguard config caused some dependency problem. Please help out.

推荐答案

Apache的日志库使用它的日志工厂的一些反思。保持他们的名字应该足够了:

The Apache logging library uses some reflection on its log factories. Keeping their names should be sufficient:

-keep class org.apache.commons.logging.**

你的配置

边注: -keep类..... 总是意味着 -keep接口..... ,这样你就可以离开了后者。

Side-note on your configuration: -keep class ..... always implies -keep interface ....., so you can leave out the latter.

这篇关于凌空ProGuard的模糊处理后,似乎不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆