Android videoView gives me Alert “Sorry,This video cannot be played”?

后端 未结 4 1102
难免孤独
难免孤独 2020-12-21 16:02
My Code::

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        VideoView vi         


        
4条回答
  •  攒了一身酷
    2020-12-21 16:47

    I'd recommend you have a look at Android's overview of supported media formats. This site covers everything from the first versions of Android to the latest:

    Android Supported Media Formats

    I'm guessing you're trying to include a video in your application, and that it needs to work on all devices, so I'd suggest you go ahead and try to encode a video with a profile similar to the SD (High quality) listed on the above mentioned site.

    There are plenty of free video converters available that you can use for encoding the video - one of them could be Freemake Video Converter.

提交回复
热议问题