I just updated my project to Androidx and upgraded to SDK version 30, but when I want to adjust my zoom value I got
java.lang.NoSuchFieldError: No static field CONTROL_ZOOM_RATIO of type Landroid/hardware/camera2/CaptureRequest$Key; in class Landroid/hardware/camera2/CaptureRequest; or its superclasses (declaration of 'android.hardware.camera2.CaptureRequest' appears in /system/framework/framework.jar)
The code that went wrong is:
builder.set(CaptureRequest.CONTROL_ZOOM_RATIO,newZoom);