我无法创建 Android 应用程序的版本,因为我正在使用 geonames 和 jdom。 jdom 给出了这个错误:
[2013-07-02 19:52:56 - <appname>] Proguard returned with error code 1. See console
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath$NSContext: can't find superclass or interface org.jaxen.SimpleNamespaceContext
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.JDOMException: can't find referenced class java.rmi.RemoteException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.JDOMException: can't find referenced class java.rmi.RemoteException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.JaxenException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.SimpleVariableContext
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.jdom.JDOMXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.jdom.JDOMXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.SimpleVariableContext
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.BaseXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.jdom.JDOMXPath
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.JaxenException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.JaxenException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.JaxenException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath: can't find referenced class org.jaxen.JaxenException
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath$NSContext: can't find referenced class org.jaxen.SimpleNamespaceContext
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath$NSContext: can't find referenced class org.jaxen.SimpleNamespaceContext
[2013-07-02 19:52:56 - <appname>] Warning: org.jdom.xpath.JaxenXPath$NSContext: can't find referenced class org.jaxen.SimpleNamespaceContext
[2013-07-02 19:52:56 - <appname>] You should check if you need to specify additional program jars.
[2013-07-02 19:52:56 - <appname>] Warning: there were 25 unresolved references to classes or interfaces.
[2013-07-02 19:52:56 - <appname>] You may need to specify additional library jars (using '-libraryjars').
[2013-07-02 19:52:56 - <appname>] java.io.IOException: Please correct the above warnings first.
[2013-07-02 19:52:56 - <appname>] at proguard.Initializer.execute(Initializer.java:321)
[2013-07-02 19:52:56 - <appname>] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-07-02 19:52:56 - <appname>] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-07-02 19:52:56 - <appname>] at proguard.ProGuard.main(ProGuard.java:492)
最佳答案
JDOM 版本 1.x 未在 Android 上得到官方支持(尽管它们可能有效)。 JDOM 2.x versions are supported (有一些限制)。
您遇到的问题是您没有移植 jaxen library到你的安卓系统。您需要确保您的项目包含 jazen jar,否则您对 JDOM XPath 的类依赖项将无法工作。
请注意,在 JDOM 2.x 中有一个 better API for XPath queries .
关于java - proguard 和 jdom 错误编译 android APK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17430455/