简体   繁体   中英

jodatime javadoc documents does not show up in Android Studio

I am trying to use joda-time in Android Studio. I have added joda-time-2.3.jar and joda-time-2.3-javadoc.jar to the libs folder of my app. The problem is when I hit ctrl+q to show the quick documentation about the method that I want to use, it does not show anything.

I wonder how can I make the Android Studio to load the documentation for the joda-time? any ideas?

Option #1

You can expand the joda-time-2.3.jar node in the Project View (under libs), open any of the classes inside, and then select "Attach Sources".

In the file picker, just select the joda-time-2.3-sources.jar file. And you're done.

Option #2

You could also include the JodaTime dependency via gradle/maven instead of including the jar file. For that, just remove the compile files('libs/joda-time-2.3.jar') line in build.gradle (as well as the jar file itself) and add in its place:

compile 'joda-time:joda-time:2.3'

That will automatically download the library, as well as its source jar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM