截击后的截击似乎不奏效。
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.
我有一个Android应用,使用谷歌截击作为我的下载代理。我只是尝试使用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.**
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.)
I was wondering if I did some proguard config caused some dependency problem. Please help out.
我想知道我是否做了一些proguard配置,导致了一些依赖问题。请帮忙。
1 个解决方案
#1
8
The Apache logging library uses some reflection on its log factories. Keeping their names should be sufficient:
Apache日志库在其日志工厂中使用了一些反射。保留他们的名字就足够了:
-keep class org.apache.commons.logging.**
Side-note on your configuration: -keep class .....
always implies -keep interface .....
, so you can leave out the latter.
关于你的配置的注意事项:-保留类…始终暗示-保持接口,所以你可以忽略后者。
更多相关文章
- Android学习笔记--《第一行代码Android》273页代码解密
- Linux下 使用Repo和Git下载Android源代码并编译
- Java已经启动,但是返回的退出代码=13 eclipse [duplicate]
- MD5加密,java工具类 String 转变成MD5 String 详细代码,工具类And
- Android有用的代码片段
- Robotium用例通过代码自动解锁屏幕
- Android代码性能优化技巧
- Android公钥私钥及代码详细解读
- android OSChina 客户端源代码剖析