- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
当我为 android 启用 proguard 时,proguard 将混淆应用程序中包含的所有 jar。这些 jar 包括:
在构建签名的 jar 时,我得到以下转储:
06-25 16:07:25.094: WARN/dalvikvm(13785): Exception Ljava/lang/NoSuchMethodError; own while initializing Lorg/apache/commons/httpclient/HttpMethodBase;
06-25 16:07:25.094: WARN/dalvikvm(13785): threadid=14: thread exiting with uncaught exception (group=0x40015560)
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): FATAL EXCEPTION: Thread-18
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): java.lang.ExceptionInInitializerError
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): at weibo4andriod.http.HttpClient.a(Unknown Source)
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): at weibo4andriod.Weibo.a(Unknown
Source)
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): at com.snda.childbook.UpdateStatusThread.run(Unknown Source)
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): at java.lang.Thread.run(Thread.java:1019)
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): Caused by: java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory.c
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): at org.apache.commons.httpclient.HttpMethodBase.<clinit>(Unknown Source)
06-25 16:07:25.104: ERROR/AndroidRuntime(13785): ... 4 more
06-25 16:07:25.104: WARN/ActivityManager(104): Force finishing activity com.snda.childbook/.BookReader
其实这个项目是关于新浪微博SDK的,我用proguard混淆的时候总是失败,错误如下:
testpostmethord] Proguard returned with error code 1. See console
[2011-06-27 15:31:11 - testpostmethord] Note: there were 1 duplicate class definitions.
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find superclass or interface javax.servlet.ServletContextListener
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextListener
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2011-06-27 15:31:11 - testpostmethord] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2011-06-27 15:31:11 - testpostmethord] You should check if you need to specify additional program jars.
[2011-06-27 15:31:11 - testpostmethord] Warning: there were 70 unresolved references to classes or interfaces.
[2011-06-27 15:31:11 - testpostmethord] You may need to specify additional library jars (using '-libraryjars').
[2011-06-27 15:31:11 - testpostmethord] java.io.IOException: Please correct the above warnings first.
[2011-06-27 15:31:11 - testpostmethord] at proguard.Initializer.execute(Initializer.java:321)
[2011-06-27 15:31:11 - testpostmethord] at proguard.ProGuard.initialize(ProGuard.java:211)
[2011-06-27 15:31:11 - testpostmethord] at proguard.ProGuard.execute(ProGuard.java:86)
[2011-06-27 15:31:11 - testpostmethord] at proguard.ProGuard.main(ProGuard.java:492)
所以我将代码 -ignorewarnings 添加到 proguard 配置文件中,所以警告都消失了,但是当我运行应用程序时,标题中的错误会发生。
最佳答案
在一个外包项目中遇到了同样的问题,开发人员似乎已经使用了世界上所有可能的免费库。
最安全的方法是向 ProGuard 提供原始库作为引用,即使其中一些已被弃用并且可能永远不会被您的代码调用:
Log4J - http://logging.apache.org/log4j/1.2/download.html
阿瓦隆 - http://www.docjar.com/jar_detail/avalon-framework-4.2.0.jar.html
阿瓦隆 LogKit - http://www.jarfinder.com/index.php/jars/versionInfo/17610
J2EE 引用 - http://www.jarfinder.com/index.php/jars/versionInfo/4598
下载所有 jar 后,将 ProGuard 指向它们:
# Apache commomns-logging fun
-libraryjars proguard_ref_lib/log4j-1.2.17.jar
-libraryjars proguard_ref_lib/avalon-framework-4.2.0.jar
-libraryjars proguard_ref_lib/avalon-logkit-2.2.1.jar
-libraryjars proguard_ref_lib/servlet-api-6.0.16.jar
# Apache commomns-logging fun ends
享受
关于java.lang.NoSuchMethodError : org. apache.commons.logging.LogFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6476847/
最近,我开始学习 cuis-smalltalk,我没有意识到与 CLOS 相比,Smalltalk 的 OOP 有多么深刻和深入(我使用的是 Ruby)。我了解到 Smalltalk 是一个自己实现的
Maven存储库包含以下两个依赖项:org.apache.commons:commons-io:1.3.2和commons-io:commons-io:1.3.2。有什么区别,我应该在pom.xml中
我刚刚在我的 pom 文件中看到 Apache commons-collections 有两个不同的组 ID: commons-collections commons-collect
Windows 上的 Common Lisp 中是否有用于串行端口通信的库? 最佳答案 下面是一些使用 SBCL 外部函数 POSIX 调用实现串行通信的函数。它不如完整的库好,但我解决了根据此协议(
SBCL 64位,1.1.7 如果我想创建一个包并使用package:CL中的一些符号,我将创建一个像这样的包: (defpackage :foo (:import-from :cl
我正在忙着学习Common Lisp,并且正在寻找一种静态代码分析工具,该工具将帮助我开发更好的样式并避免陷入常见的陷阱。 我找到了Lisp Critic,看起来不错,但我希望有人可以推荐其他一些工具
我正在阅读《Practical Common Lisp》一书,在第 22 章第 284 页的脚注 5 中,我看到一段让我感到困惑的代码片段。 我知道变量list和tail有一个共同的列表结构,但我很困
我正在阅读 Practical Common Lisp ,并且对 Lisp 的 COPY-TREE 函数有疑问。 书中给出了调用的例子 (copy-tree '( '(1 2) '(3 4) '(5
我正在尝试使用 user guide 中的抓取示例运行 geb用于引入依赖项: $ cat my.groovy @Grapes([ @Grab("org.gebish:geb-core:0.9
这里一定有更好的方法,对吧? (format t "Enter your age: ~%") (defun age-case (age) (case age (1 (format t "Y
如何在 do 循环中绑定(bind)从函数返回的多个值? 以下显然是非常错误的,但是这样的事情可能吗? (do (((x y z) (3-val-fn) (3-val-fn))) ((equa
所以我正在学习 Lisp 做分数,这很棒。但是为什么这个相等性检查返回 NIL: * (= 0.2 1/5) NIL ...如果转换为 float 则返回 True第一的: * (=
是否可以“统计”一个文件并找到它的文件类型 - 常规或目录? 最佳答案 阅读关于 portable pathname library 的章节来自 Peter Seibel 的 Practical Co
我是 CL 的新手,正在使用 AllegroCL。我试图弄清楚如何组织我的源代码以满足以下要求: 我想阻止 src 代码包含我的测试套件。 我想以可移植的方式声明项目依赖项(src 和 test de
谁能告诉我最新的标准化 Common Lisp 的文档是什么(应该遵循各种实现的文档)?我问是因为我可以在网上找到很多关于 CL 的书都来自 90 年代,所以我想知道它们是否是最新的。我也来自于在 R
假设我必须定义一个名为foo 的函数。假设,为了定义它,我使用了一些辅助函数 foo1, foo2, foo3, ... 当我加载包含这些函数的文件时,我可以从顶层使用所有这些函数。相反,我只想从顶层
这拒绝编译。注释掉 (setf roll行让它编译。然而,(setf roll...本身在 REPL 中正确评估。 程序: ;; loop n times ; sum up number of hit
我目前正在学习 Common Lisp,并尝试将一些 JSON 发送到网络服务。我要发送的 JSON 以类似于以下的结构表示: ((:ITEMS ((:KEY . "value1") (:IGNO
我有一个带波浪号的目录名(作为字符串):~/projects . 我想得到它的完整路径:/home/user/projects .我怎么做 ? 目标是将它传递给 uiop:run-program ,这
我想从输入文件中读取一个字符串(用户可能修改也可能没有修改)。我想将此字符串视为使用固定数量的参数调用的格式指令。但是,我知道某些格式指令(特别是我想到的 ~/)可能会用于注入(inject)函数调用
我是一名优秀的程序员,十分优秀!