Adding Joda Time to Android Studio

Deadly 提交于 2019-11-29 22:50:34
Amit K. Saha

in app/build.gradle file, add like this-

dependencies {    
    compile 'joda-time:joda-time:2.9.4'
}

You don't need to do anything else.

You need the latest release, check out the release page https://github.com/JodaOrg/joda-time/releases and change the version accordingly.

I added joda time via File/Project Structure/Modules-App/Dependencies.

Clicking on + and Library dependency brings you to the dialog:

Here you can search for joda and add the actual version to your project. If you add it this way you don't have to manually download the newest version from github or manually write something into your build.gradle file. Android Studio does it all for you.

Mehdi Khademloo

I completely prefer to use jitpack.io repository.

In this case, you should get GitHub links of joda-time (just a simple search) and go to Jitpack.IO then search for the github link.

After all, you should get this page and do the instructions.

https://jitpack.io/#JodaOrg/joda-time/v2.9.4

Just sync your gradle and all done...

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