CameraX code doesn't work on camera version 1.0.0-beta01

After implementing this camera version, PreviewConfig does not have a method Builder() and there is no method setOnPreviewOutputUpdateListener().

Please upload the code which supports this version.

Same Here, looking for solutions.

Already know that PreviewConfig is deprecated, so just do:
Val preview = Preview.Builder().build()