【发布时间】:2019-10-20 05:25:12
【问题描述】:
请在下面找到xml
<VideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
Java 代码:
String url = "android.resource://com.example.androidtutorial/" + R.raw.instructions;
videoView.setVideoURI(Uri.parse(url));
videoView.start();
Logcat 中显示错误:
2019-10-20 10:51:16.708 5063-5063/? E/androidtutoria: Unknown bits set in runtime_flags: 0x8000
2019-10-20 10:51:22.825 5063-5080/com.example.androidtutorial E/MediaPlayerNative: error (1, -2147483648)
2019-10-20 10:51:23.178 5063-5063/com.example.androidtutorial E/MediaPlayer: Error (1,-2147483648)
我在互联网上看到许多使用相同代码的示例,但就我而言,它不起作用。
【问题讨论】:
标签: android android-studio android-layout android-videoview