I use Android studio 2.2, and use the embedded JDK as my project's JDK, this is the recommended way as the settings show.
My project has a java module run on the host. When I working on this java module, the popup menu show Fetching documentation... and take a little time to show the documentation every time I want to look up documentation of some Java APIs.
I have another version JDK installed on my host, /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
so I try to change several lines of the file ~/Library/Preferences/AndroidStudio2.2/options/jdk.table.xml from
<javadocPath>
<root type="composite">
<root type="simple" url="http://docs.oracle.com/javase/8/docs/api" />
</root>
</javadocPath>
to
<javadocPath>
<root type="composite">
<root type="simple" url="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/src.zip!/" />
<root type="simple" url="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/javafx-src.zip!/" />
</root>
</javadocPath>
But after I restart Android studio, my changes didn't take effect. When I look up the documentation, it's till very slow, and the content of jdk.table.xml has recover back, javadocPath url path still point to http://docs.oracle.com/javase/8/docs/api.
How can I use local JDK documentation in Android studio with embedded JDK?
Android SDK Managerfor your platform. That way Android Studio shows the local docs.Documentation for Android SDK, what I need is java sdk documentation.