title: Android Studio "Can't play this video
body: <p>I am trying to play a video in my Android Studio emulator.</p>
  
  <p>However, it shows dialog <strong>Can't play this video</strong></p>
  
  <p>I read a lot of similar questions on Stackoverflow, but none of those could fix it.</p>
  
  <p>Hope anyone could help!</p>
  
  <p>Thank you in advance.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          VideoView videoView = (VideoView) findViewById(R.id.videoView);
  
          videoView.setVideoPath("android.resource://" + getPackageName() + "/" + R.raw.demo);
  
          //MediaController mc = new MediaController(this);
  
          //mc.setAnchorView(videoView);
  
          //videoView.setMediaController(mc);
  
          videoView.start();
      }
  }
  </code></pre>
  
  <p>and my logs show</p>
  
  <pre><code>02-09 01:19:41.811 8704-8704/? W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
  02-09 01:19:41.817 8704-8704/? D/MediaPlayer: getMetadata
  02-09 01:19:41.842 8704-8719/? E/MediaPlayer: error (1, -38)
  02-09 01:19:41.845 8704-8718/? E/MediaPlayer: error (1, -38)
  02-09 01:19:41.847 8704-8704/? E/MediaPlayer: Error (1,-38)
  02-09 01:19:41.848 8704-8704/? D/VideoView: Error: 1,-38
  02-09 01:19:41.880 8704-8704/? E/MediaPlayer: Error (1,-38)
  02-09 01:19:41.880 8704-8704/? D/VideoView: Error: 1,-38
  </code></pre>