Skip to content
Advertisement

Android Jetpack CameraX method createSurfaceProvider() not found

I ran into a problem when working with CameraX on the tutorial from the android documentation. I can’t find a method createSurfaceProvider()

I am using these libraries: camerax_version = "1.0.0-beta10"

CODE:

JavaScript

Advertisement

Answer

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) }

Advertisement