根据 API 文档,setBackgroundResource 函数需要一个整型参数。 如果你一定需要使用位图,你可以使用 setBackgroundDrawable 函数并将位图封装在 BitmapDrawable 中。 例如:textureView.setBackground(new BitmapDrawable(getResources(), bitmap));