简体   繁体   中英

Android: Sorry this video can not be played in videoview

I know there are many questions and answer on this, but I went through all, but I could not find any solution, and its almost two months I am again and again encountering this issue of "Sorry this video can not be played".

Here is my xml file

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
 >

<VideoView
    android:id="@+id/booksanimation"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    />
</RelativeLayout>

Here is my code..

    getWindow().setFormat(PixelFormat.TRANSLUCENT);
    videoview = (VideoView) findViewById(R.id.booksanimation);
    videoview.setVideoURI(Uri.parse("android.resource://com.d4sys.sabaq/" + R.raw.booksanimation));
    videoview.setMediaController(new MediaController(this));
    videoview.requestFocus();
    videoview.start();

I do not know what are the problems, sometimes when i place another video with different resolution, that video is played but not all videos are played.. If some video is playing on Tablet, it does not play on small devices,, what are the issues?

Have you check the video format? Not all format supported natively by Android I face similar problem before and in the end i change all mov to mp4

http://developer.android.com/guide/appendix/media-formats.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM