Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 0.8 Beta Screen Capture / Video Capture broken

I upgraded Android Studio from 0.6.2 to 0.8 beta last night, with no issues.

Unfortunately, I just tried to grab a video capture from Glass (I've been sending regular progress updates in this way) to find it doesn't work any more. Pressing record skips the actual recording process and jumps straight to the save dialogue, saving a video file with no content.

The screen capture button shows an error:

Unexpected error while obtaining screenshot: java.lang.IllegalStateException: @NotNull method com/android/tools/idea/ddms/screenshot/DeviceArtDescriptor.getArtDescriptor must not return null

Any ideas what might be causing this or how to fix it?

like image 984
Shaun Avatar asked Jun 27 '14 10:06

Shaun


1 Answers

It is a known issue, and has been fixed for 0.8.2; however, there is a work-around to fix it for this version.

Solution

If anyone needs a workaround: edit the following file in your Android Studio distribution: plugins/android/lib/device-art-resources/device-art.xml

On line 33, insert <!-- and on line 43 insert -->

In other words, comment out the two tv device definitions. They don't supply a portrait orientation, which is what is causing the crash in the screenshot code (when it searches for device art to surround the device with).

If you do this, note that you may get conflicts in a future update, so please copy the original file somewhere and restore it before updating to 0.8.2.

Posted by Tnor, on https://code.google.com/p/android/issues/detail?id=72580.

like image 167
Advice-Dog Avatar answered Nov 14 '22 22:11

Advice-Dog