Android L, exception using joda.time Library

て烟熏妆下的殇ゞ 提交于 2019-12-23 16:48:16

问题


An app used to work in all devices including (nexus 5 and nexus 7). Running the same app on Android L preview, the app crash.

I have been debugging and the exception was founded calling DateTime Constructor.

public static String[] getAge(Context context, Date date) {
        DateTime time = new DateTime(date);
        DateTime nowTime = new DateTime(new Date());

}

Log:

java.lang.SecurityException: Incorrect signature
at org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.java:223)
    at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:294)
    at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:268)
    at java.util.jar.JarFile.getInputStream(JarFile.java:380)
    at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
    at java.net.URL.openStream(URL.java:470)
    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
    at org.joda.time.tz.ZoneInfoProvider.openResource(ZoneInfoProvider.java:202)
    at org.joda.time.tz.ZoneInfoProvider.<init>(ZoneInfoProvider.java:123)
    at org.joda.time.tz.ZoneInfoProvider.<init>(ZoneInfoProvider.java:82)
    at org.joda.time.DateTimeZone.getDefaultProvider(DateTimeZone.java:490)
    at org.joda.time.DateTimeZone.setProvider0(DateTimeZone.java:444)
    at org.joda.time.DateTimeZone.<clinit>(DateTimeZone.java:116)
    at org.joda.time.DateTimeUtils.<clinit>(DateTimeUtils.java:48)
    at org.joda.time.DateTimeUtils.getChronology(DateTimeUtils.java:282)
    at org.joda.time.convert.AbstractConverter.getChronology(AbstractConverter.java:82)
    at org.joda.time.base.BaseDateTime.<init>(BaseDateTime.java:170)
    at org.joda.time.DateTime.<init>(DateTime.java:241)

Any idea about?

来源:https://stackoverflow.com/questions/24556447/android-l-exception-using-joda-time-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!