I have used a VideoView on my main.xml (with a relative layout) and tried to play an mp4 video (via instantiating a MediaPlayer and ...), but there is an error which says: this video can't be played.
When I watch the logcat, I see that it says:
the Parent view is not a TextView
Would you please help me?
My main.xml is as follows:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Main">
<VideoView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/videoView1"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true" />
 </RelativeLayout>
and my Main.java is as follows:
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.MediaController;
import android.widget.VideoView;
public class Main extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    VideoView vv = (VideoView) findViewById(R.id.videoView1);
    vv.setVideoPath("/storage/extSdCard/vid.mp4");
    vv.setMediaController(new MediaController(this));
    vv.start();
    vv.requestFocus();
}
}
 
    