代码如下
val videoView: VideoView = findViewById(R.id.bg_video)
val uri = "android.resource://" + packageName + "/raw/mainvideo"
videoView.setVideoURI(Uri.parse(uri))
进入app
显示弹窗 无法播放此视频
报错如下
07-20 18:46:27.179 32219-32219/? E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
07-20 18:46:27.179 32219-32219/? E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
07-20 18:46:27.179 32219-32219/? E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
07-20 18:46:27.179 32219-32219/? E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
07-20 18:46:27.189 32219-32231/? E/MediaPlayer: error (1, -2147483648)
07-20 18:46:27.208 32219-32219/? E/MediaPlayer: Error (1,-2147483648)
07-20 18:46:27.252 32219-32219/? E/FfmpegSource: read file fail
07-20 18:46:27.254 32219-32219/? E/OppoMediaPlayer: error: -2147483648