问题
I have updated android studio from 3.0.1 to 3.1,now there is no option for directly view the XML file in Android studio 3.0.1 there is option for Save Screenshot
Now in update android studio version to 3.1,it's missing
is it moved to any other place?
回答1:
There are many changes that have been done into Layout Inspector and Layout Editor in Android Studio Version 3.1.0
Layout Inspector
The Layout Inspector gained new features, including some functionality previously provided by the deprecated Hierarchy Viewer and Pixel Perfect tools:
Zoom buttons and keyboard shortcuts for navigating and inspecting layouts Reference grid overlay Ability to load a reference image and use it as an overlay (useful for comparing your layout with a UI mockup) Render subtree preview to isolate a view in a complex layout
Layout Editor
The Palette in the Layout Editor has received many improvements:
Reorganization of categories for views and layouts.
- New Common category for views and layouts, which you can add to with a Favorite command.
- Improved search for views and layouts.
- New commands for opening documentation for a specific view or layout element.
You can use the new Convert view command in the Component tree or design editor to convert a view or layout to another type of view or layout.
You can now easily create constraints to items near the selected view using the new Create a connection buttons in the view inspector at the top of the Attributes window.
Ref: https://developer.android.com/studio/releases/index.html
But nowhere it is mentioned that this option "Save Screenshot" is deprecated/removed. So I am suspecting this is a bug.
Or if they intentionally removed it, They should have mentioned the reasons.
IMO, This option doesn't make too much sense as you have screenshot option already under Logcat window. Sure you need to run the application to get it. But you can't be sure of your design just seeing it on Editor Preview, it is always recommended to run the application on emulator or a device.
回答2:
I have reported this issue over here,https://issuetracker.google.com/issues/78441481
ans reply from is
"This is WAI, we deprecated this feature."
回答3:
Follow below Process:
- Run your app on a connected device or emulator.
- If using a connected device, be sure you have enabled USB debugging.
- In Android Studio, select View > Tool Windows > Logcat to open Logcat
- Select the device and a process from the drop-down at the top of the window.
- Click Screen Capture on the left side of the window.
Source:
https://developer.android.com/studio/debug/am-screenshot.html
来源:https://stackoverflow.com/questions/49504538/save-screenshot-option-is-missing-in-android-studio-3-1