Android Jetpack CameraX method createSurfaceProvider() not found
Just replace
preview.setSurfaceProvider(previewView.createSurfaceProvider(camera.getCameraInfo()));
with
preview.setSurfaceProvider(previewView.getSurfaceProvider());
Just followed the latest tutorial and faced with same issue. But if you simply call the property surfaceProvider of your preview everything will work.
val preview = Preview.Builder() .build() .also { it.setSurfaceProvider(viewFinder.surfaceProvider) }