I want to capture photos with fixed resolution (i.e. 1200x1600
) using CameraX library.
So according to documentation I can set target resolution for
It could be a bug that have been recently fixed at AOSP. refer https://android.googlesource.com/platform/frameworks/support/+/5c1aed8c4c502a74eb4ee6d30fe2089f4afcaf11
The android documentation say this:
You cannot set both target aspect ratio and target resolution on the same use case. Doing so will throw an IllegalArgumentException when building the config object.
So decide what is mor important for you and choose only one.