java.lang.NoClassDefFoundError:org.joda.time.DateTime [英] java.lang.NoClassDefFoundError: org.joda.time.DateTime

查看:278
本文介绍了java.lang.NoClassDefFoundError:org.joda.time.DateTime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在android 4.3 API 18上启动应用程序时收到此错误.

Getting this error when starting the app on android 4.3 API 18.

没有编译错误,并且库已添加到build.gradle

There are no compilation errors, and library is added in build.gradle

    compile 'joda-time:joda-time:2.9.2'

在android api 23上可以正常使用,但是在此设备上,该应用在启动时崩溃.

On android api 23 works with no problems, but on this device the app crashes on start.

知道为什么吗? (已经尝试清理,重建等)

Any idea why? ( already tried to clean, rebuild, etc)

推荐答案

发现了问题.

我放入了 build.gradle

    multiDexEnabled true

所以我必须使自定义应用程序扩展 MultiDexApplication

so I had to make my custom Application extend MultiDexApplication

这篇关于java.lang.NoClassDefFoundError:org.joda.time.DateTime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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