title: Android VideoView won't Play
body: <p>So I'm trying to play a basic avi video in android, it seems to run fine on Windows Media Player, VLC, etc. so it doesn't look like it's requiring any complicated codecs. I have a video view in my app and that's it, and I have my video in my resources directory under:</p>
  
  <pre><code>res/raw/my_video.avi
  </code></pre>
  
  <p>This is the code I'm using to load my video:</p>
  
  <pre><code>setContentView(R.layout.activity_main);
  VideoView videoView = (VideoView) findViewById(R.id.videoView1);
  Uri video = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.my_video);
  videoView.setVideoURI(video);
  videoView.start();
  </code></pre>
  
  <p>And it does not work. I get a popup saying "Can't play this video" along with a logcat message:</p>
  
  <pre><code>03-10 01:42:12.102: E/(185): Failed to open file 'android.resource://com.securespaces.android.bootstrap/2130968576'. (No such file or directory)
  03-10 01:42:12.102: E/MediaPlayer(9737): error (1, -2147483648)
  03-10 01:42:12.142: E/MediaPlayer(9737): Error (1,-2147483648)
  </code></pre>
  
  <p>I'm running this on a Nexus 5 running 4.4.2 stock by the way. I'm following instructions that I found in other stack over flow questions here: <a href="https://stackoverflow.com/questions/3028717/how-to-play-videos-in-android-from-assets-folder-or-raw-folder">How to play videos in android from assets folder or raw folder?</a> with some minor tweaks so that I am using a VideoView that I grab from a layout file.</p>
  
  <p>I'm really stumped as to why this isn't working. I've browsed through a few questions on this subject, but this feels like something that should be a duplicate. I'm running this on a Nexus 5 running 4.4.2 stock by the way.</p>
  
  <p>To clarify the question, I'm wondering what I am doing wrong, or is there an alternative for just playing a simple AVI video?</p>