Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get rid of the "Choose external documentation root" dialog?

When I select the "View External Documentation" button (the up arrow) in the Android Studio documentation pop-up window, rather than just bringing me to the appropriate Android documentation, it instead shows me a choice of two links, identical except that in the fragment at the end, one has dashes instead of parentheses. The dashes one doesn't work, while the parentheses one does.

For example: http://developer.android.com/reference/java/lang/String.html#format-java.lang.String-java.lang.Object...- http://developer.android.com/reference/java/lang/String.html#format%28java.lang.String,%20java.lang.Object...%29

I'd love to know where this came from, and how I can make it go away.

(edit: Per a suggestion, here's a list of all the documentation & source packages I've installed through the SDK Manager:

"Sources for Android SDK" for API 21 rev 1 and API 14 rev 1.

I have no documentation packages installed.)

(edit: Removing the two source packages doesn't fix the problem.)

Here (I think) is where in the code for Android Studio the dialog is defined: https://android.googlesource.com/platform/tools/idea/+/f88d3e15cd8228cba4070811da68d8ad54d81fd7/platform/lang-impl/src/com/intellij/ide/actions/ExternalJavaDocAction.java

(edit: This is no longer happening (at least to me); instead it loads a local copy of the documentation, e.g. file:///Users/jesse.w/adt-bundle-mac-x86_64-20140702/sdk/docs/reference/android/app/Service.html#onStartCommand%28android.content.Intent,%20int,%20int%29 ). I don't know why.)

like image 313
Jesse W at Z - Given up on SE Avatar asked Nov 10 '22 20:11

Jesse W at Z - Given up on SE


1 Answers

Update 2017-03-03: It's fixed in Android Studio 2.3 (build Feb 24, 2017)

Old information: I also had this small but annoying issue in both Android Studio 2.1.2 and Intellij Idea 2016.1 and for previous versions on my mac as well:

enter image description here

It's interesting that it happens only for method look-up. For classes it works correctly and brings up external documentation right away without prompts. I.e. on the screenshot above there is the prompt with an extra link when external doc is invoked for the method SetAction but everything is fine when documentation is displayed for the class Intent

I've contacted Jetbrains technical support and they confirmed this bug. Guys from JetBrains are really awesome - it took about one day and they proposed me to use a fixed version! Many thanks to JetBrains team. The fixed EAP version 162.917.19 can be downloaded here for preview:

IDEA 2016.2 EAP

This version of Intellij Idea creates correct links for everything. I hope the fix will be eventually available in Android Studio as well.

like image 55
Andrew Terekhine Avatar answered Nov 14 '22 22:11

Andrew Terekhine