问题
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,
- Hover over the yellow popup text
- Alt+LeftMouseClick
- 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:
- press control + option simultaneously
- hover over the text that has an error
- 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
- Hover on the error or warning popup text
- Maintain CTRL to keep it displayed
- 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