摄像头启动必须在硬件加速的情况下。

我接手的项目之前设置了在Androidmanifest中,硬件加速关闭。这个设置true就好了。

<application
android:hardwareAccelerated="true"