Android的 - 使用约达时间时,不能使用ProGuard,出口APK [英] Android - can't export apk with Proguard, when using Joda Time

查看:724
本文介绍了Android的 - 使用约达时间时,不能使用ProGuard,出口APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用乔达-time.jar 在我的应用程序,并签署了出口的apk proguard的话说像时(这是我所看到的pretty常见的问题,当我看到互联网)

I use joda-time.jar in my app, and when exporting signed apk proguard saying something like (it is pretty common problem as I can see, when I look over internet):

[2014-01-07 12:44:53 - XYZ] Proguard returned with error code 1. See console
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.DateTime: can't find referenced class org.joda.convert.FromString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.Days: can't find referenced class org.joda.convert.FromString
...
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.Years: can't find referenced class org.joda.convert.FromString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.Years: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.base.AbstractDuration: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.base.AbstractInstant: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.base.AbstractPeriod: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ]       You should check if you need to specify additional program jars.
[2014-01-07 12:44:53 - XYZ] Warning: there were 37 unresolved references to classes or interfaces.
[2014-01-07 12:44:53 - XYZ]          You may need to specify additional library jars (using '-libraryjars').
[2014-01-07 12:44:53 - XYZ] java.io.IOException: Please correct the above warnings first.
[2014-01-07 12:44:53 - XYZ]     at proguard.Initializer.execute(Initializer.java:321)
[2014-01-07 12:44:53 - XYZ]     at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-07 12:44:53 - XYZ]     at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-07 12:44:53 - XYZ]     at proguard.ProGuard.main(ProGuard.java:492)

在到处论坛或也在这里(<一href=\"http://stackoverflow.com/questions/17753988/android-proguard-didnt-compile-with-joda-time-jar-file\">Android - Proguard的不与乔达时JAR文件编译)他们说溶液应下载乔达-convert.jar ,加入到构建路径。但对我来说,它只是不工作,我做了之后,proguard的再次说,类似的事情:

Everywhere in forums or also here (Android - Proguard didn't compile with Joda Time jar file) they say solution should be downloading joda-convert.jar, adding to buildpath. But for me it just DOESN'T WORK, after I did it, proguard again says something similar:

[2014-01-07 12:41:39 - XYZ] Proguard returned with error code 1. See console
[2014-01-07 12:41:39 - XYZ] Warning: org.joda.convert.JDKStringConverter$9: can't find referenced class javax.xml.bind.DatatypeConverter
[2014-01-07 12:41:39 - XYZ] Warning: org.joda.convert.JDKStringConverter$9: can't find referenced class javax.xml.bind.DatatypeConverter
[2014-01-07 12:41:39 - XYZ] Warning: org.joda.convert.JDKStringConverter$9: can't find referenced class javax.xml.bind.DatatypeConverter
[2014-01-07 12:41:39 - XYZ]       You should check if you need to specify additional program jars.
[2014-01-07 12:41:39 - XYZ] Warning: there were 3 unresolved references to classes or interfaces.
[2014-01-07 12:41:39 - XYZ]          You may need to specify additional library jars (using '-libraryjars').
[2014-01-07 12:41:39 - XYZ] java.io.IOException: Please correct the above warnings first.
[2014-01-07 12:41:39 - XYZ]     at proguard.Initializer.execute(Initializer.java:321)
[2014-01-07 12:41:39 - XYZ]     at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-07 12:41:39 - XYZ]     at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-07 12:41:39 - XYZ]     at proguard.ProGuard.main(ProGuard.java:492)

如何解决这个问题?我花了乱投医几个小时,但我无法找到它......非常感谢!

How to fix this issue? I spend few hours of trying everything, but I just can't find it out...Many thanks!

推荐答案

好吧,我想通了。实际添加的乔达-convert.jar 以构建路径的作品,但仅限于旧版本(1.4和更低的,如果你下载最新一期 - 1.5 乔达-convert.jar ,它不工作)...

Ok I figured it out. Actually adding joda-convert.jar to build path works, but only for older version (1.4 and lower, if you download latest one - 1.5 joda-convert.jar, it doesn't work)...

这篇关于Android的 - 使用约达时间时,不能使用ProGuard,出口APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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