【发布时间】:2014-06-18 08:15:32
【问题描述】:
我有两个片段,它们有一个 TextureView 来显示相机预览或播放视频。
在使用应用程序一段时间后,玩屏幕, 我在 logcat 中收到此错误
OpenGLRenderer﹕ GL_INVALID_OPERATION
我从我的碎片中释放一切, 所有成员都设置为空。
@Override
public void onDestroyView() {
Logg.DEBUG(TAG, "onDestroyView");
super.onDestroyView();
if (mMediaPlayer != null) {
mMediaPlayer.stop();
mMediaPlayer.release();
mMediaPlayer = null;
}
nextButton = null;
pauseButton = null;
backButton = null;
playButton = null;
frontTextView = null;
backTextView = null;
surface = null;
videoView = null;
}
我看到整个视图变得很奇怪......
我错过了什么?
【问题讨论】:
-
你在任何设备上试过了吗?还是模拟器?
-
设备。 Nexus 5、Galaxy S3/4、Moto G 等
标签: android android-camera android-mediaplayer textureview