Let me go and finally solve this problem.
When loading a video file in the android simulator, it will prompt: the video cannot be played! Therefore, I found the error log under logcat, which has the following lines of error display:
Error/playerdriver (31): Command player_prepare completed with an error or info
Pvmferrresource
: Error/mediaplayer (19049): Error (1,-17)
: Error/mediaplayer (19049): Error (1,-17)
Yesterday, I repeatedly searched,CodeNo error. It will happen at half past one. I chose to temporarily give up and put it aside. I checked some information on the Internet and could not find a solution to the problem. Today, I opened it again and looked at some source code. I tried to add the following code in the main. xml configuration information in the layout Folder:
<Textview
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: text = "@ string/hello"
/>
Yes, it is fixed. Due to limited capabilities, I can only make the following understandings and explanations. If you have any different or better insights, I hope to raise them. The following is my main. xml configuration file:
<Framelayout
Xmlns: Android = "http://schemas.android.com/apk/res/android"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent">
<Textview
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: text = "@ string/hello"
/>
<Videoview
Android: Id = "@ + ID/video"
Android: layout_height = "wrap_content"
Android: layout_width = "wrap_content"
Android: layout_gravity = "center"/>
</Framelayout>
Since I am using the framelayout layout, we may wish to use framelayout as a canvas, fixed from the upper left corner of the screen to fill in images and text. For example, myProgramTo display the video file, I first display the text file, then fill in my video file, overwrite the former, and display it to the client.