title: Unexpected error while obtaining screenshot from device: EOF Android Studio 3.2.1
body: <p>I am getting an error while taking screenshots from Android Studio 3.2.1, but working in another system (Android studio 3.1.3). Video capturing working perfectly. </p>
  
  <p>It gives me below error.</p>
  
  <blockquote>
    <p>Unexpected error while obtaining screenshot from device: EOF</p>
  </blockquote>
  
  <p>This is not a duplicate of <a href="https://stackoverflow.com/q/37145130/3778703">Nirali's question</a>,</p>
  
  <p>I tried below options </p>
  
  <p><strong>1:</strong> Restarting the Android Studio worked for me.</p>
  
  <p>It doesn't give the screen capture error after I restarted Android studio.</p>
  
  <p><strong>2:</strong> Go to Android Studio <strong>Settings -> System settings -> checked Support screen reader</strong> and restart your Android Studio.</p>
  
  <p><a href="https://i.stack.imgur.com/WvBa4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WvBa4.png" alt="enter image description here"></a></p>
  
  <p><strong>3:</strong> <code>getActivity().getWindow().addFlags(LayoutParams.FLAG_SECURE);</code> is never used in my application.</p>
  
  <p>What is a perfect solution for it?</p>