How to copy error message in Android Studio tooltip

一个人想着一个人 提交于 2019-12-23 09:30:16

问题


How can you select or copy the error tooltips that appear when hovering over code in Android Studio?

For example:

Is there a key command? I'm on Mac if that's relevant. Thanks!


回答1:


On Mac, a slightly different dance than Windows.

  • hold shift
  • click and hold towards the end of the text(probably missing last character)
  • keep holding mouse click and release shift
  • while holding mouse click, press Command + C to copy
  • paste wherever



回答2:


On Windows: try,

  1. Hover over the yellow popup text
  2. Alt+LeftMouseClick
  3. The 'yellow text' should now be on your clipboard, ready to paste.

That is it!




回答3:


The older solutions don't seem to be working for me. Not sure if the behavior changed, but here is what is working for me on a Mac with Android Studio 3.4:

  1. press control + option simultaneously
  2. hover over the text that has an error
  3. click on the tooltip when it pops up.



回答4:


Once popup shows up, move your mouse pointer over it and simply select (mark) bubble's text, then do Copy with keyboard shortcut (CTRL+C on Windows or Command+C on Mac) while still having mouse pointer over the bubble.

Not sure how on Mac, but on Windows it works that way for me, with the exception that you need to keep mouse pointer over the bubble all the time otherwise it is gone (which sometimes forces me to copy all but last character from that message).




回答5:


On Ubuntu, try

  1. Hover on the error or warning popup text
  2. Maintain CTRL to keep it displayed
  3. Use the cursor to select the text



回答6:


Ubuntu:

When you make the popup shows up, hold Alt+Shift and carefully select any amount of the text and press Ctrl+C.

You don't need to select all of the text, because it will always copy the whole message ignoring the selection.

Tested on Ubuntu 18.04.3 LTS and Android Studio 3.5.2.



来源:https://stackoverflow.com/questions/43664924/how-to-copy-error-message-in-android-studio-tooltip

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