Android does not support the AVI video container format - the message you are seeing is the normal message you would get when you try to play an unsupported video format.
See here for the up to date list of supported formats:
Note that you say you are trying to play an 'avi/mp4' video - this is unusual as AVI and MP4 are alternative video containers, so a video would normally be one format or there other.
Updated answer
Ok - I have checked the video posted below in the comments and it will definitely play on an Android 4.4.2 device.
The following code works (it played your video) and may be useful to try in your app (updated to use your own view id, video path etc). It is for use in a fragment, but you can change it for an activity if that is your use case:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_item_detail, container, false);
//Create the video player and set the video path
videoPlayerView = (VideoView) rootView.findViewById(R.id.video_area);
if (videoPlayerView == null) {
Log.d("ItemDetailFragment","onCreateView: videoPlayerView is null");
return null;
}
//Set the video path and make sure the first frame is shown instead of a black screen
videoPlayerView.setVideoPath(selectedVideoItem.videoPath);
videoPlayerView.seekTo(100);
//Set the MediaController (the video control bar) to match the size of the VideoView - this trick
//from a StackOverflow answer makes sure it is sized correctly, calling setAnchroView after the
//Video is actually loaded and hence knows it right sze.
final Context mContext = this.getActivity();
videoPlayerView.setOnPreparedListener(new OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
//Add a listener for the size change to correctly set the controls
mp.setOnVideoSizeChangedListener(new OnVideoSizeChangedListener() {
@Override
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
//Add Media Controller and set its position on the screen.
mediaController = new MediaController(mContext);
videoPlayerView.setMediaController(mediaController);
mediaController.setAnchorView(videoPlayerView);
}
});
}
});
return rootView;
}
Also, make sure your app has permission to read external storage as media player errors are sometimes caused by underlying problems and not very helpfully reported. The following line should be in your manifest:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />