java.lang.UnsupportedOperationException: TextureView doesn‘t support displaying a background drawabl

Posted 柳鲲鹏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java.lang.UnsupportedOperationException: TextureView doesn‘t support displaying a background drawabl相关的知识,希望对你有一定的参考价值。

具体错误

     Caused by: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable
2021-11-01 20:17:29.248 19010-19010/com.serenegiant.usbcameratest E/androidRuntime:
        at android.view.TextureView.setBackgroundDrawable(TextureView.java:328)
        at android.view.View.setBackground(View.java:23882)
        at android.view.View.<init>(View.java:6080)
        at android.view.View.<init>(View.java:5468)
        at android.view.TextureView.<init>(TextureView.java:167)
        at com.serenegiant.widget.SimpleUVCCameraTextureView.<init>(SimpleUVCCameraTextureView.java:50)
        at com.serenegiant.widget.SimpleUVCCameraTextureView.<init>(SimpleUVCCameraTextureView.java:46)

解决办法:

找到对应的布局xml,把TextureView的background一句删除即可。

原因就是现在不支持了。

以上是关于java.lang.UnsupportedOperationException: TextureView doesn‘t support displaying a background drawabl的主要内容,如果未能解决你的问题,请参考以下文章