Strange Behavior of Android VideoView - “Can't Play Video”

前端 未结 11 1382
無奈伤痛
無奈伤痛 2020-11-30 03:06

In my application,showing video from sdcard folder or new taken video from Video intent in a VideoView in different Activity by passing file path of the video selected.

11条回答
  •  醉话见心
    2020-11-30 04:06

    I kept getting the same "Can't Play Video" message while trying to play video from the phone itself. First I didn't input good path to a file but there was anther interesting issue.

    1. I've type path from the root, example /videoFileName.mp4 and I should have type it with sdcard in between like /sdcard/videoFileName.mp4

    2. My Sony Ercisson Xperia Arc was connected as a usb mass device storage at the same time I was running my app through adb, so internal sd card was unmounted and file could not be found. I've discovered this when I tryed same code on Samsung Galaxy S which behaves differently when connected.

提交回复
热议问题