Note that there are some explanatory texts on larger screens.

plurals
  1. PONexus 7 Android Java VideoView, Can't play this video
    text
    copied!<p>i tried to stream a video on my nexus 7 (android 4.2) with the videoview lib, but my nexus 7 displays "Can't play this Video" when i start the app, hope you can help. my sourcecode:</p> <pre><code>package com.test.prog; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.widget.Button; import android.widget.LinearLayout; import android.widget.VideoView; public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Uri viduri=Uri.parse("http://www.law.duke.edu/cspd/contest/finalists/viewentry.php?file=docandyou"); VideoView video=(VideoView)findViewById(R.id.videoview); video.setVideoURI(viduri); } } </code></pre> <p>and the layout</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" tools:context=".MainActivity" &gt; &lt;VideoView android:id="@+id/videoview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>LogCat says:</p> <pre><code>11-19 17:46:08.504: D/VideoView(16804): Error: 1,0 11-19 17:46:19.504: D/MediaPlayer(16804): Couldn't open file on client side, trying server side 11-19 17:46:19.504: E/MediaPlayer(16804): Unable to to create media player </code></pre> <p>regards christian</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload