title: How do you properly use setTargetAspectRatio?
body: <p>I am relatively new to developing on android and I am trying to implement a camera feature. I am using this page as a guide <a href="https://www.journaldev.com/30132/android-camerax-overview" rel="nofollow noreferrer">https://www.journaldev.com/30132/android-camerax-overview</a>. </p>
  
  <p>The section of code below is what I am having trouble with.</p>
  
  <pre><code>Rational aspectRatio = new Rational(textureView.getWidth(), textureView.getHeight());
  Size screen = new Size(textureView.getWidth(), textureView.getHeight()); //size of the screen
  
  PreviewConfig pConfig = new PreviewConfig.Builder().setTargetAspectRatio(aspectRatio).setTargetResolution(screen).build();
  </code></pre>
  
  <p>When a Rational is passed into setTargetAspectRatio, Android Studio gives the error 'Rational cannot be converted into AspectRatio. </p>
  
  <p>According to <a href="https://developer.android.com/reference/androidx/camera/core/PreviewConfig.Builder#setTargetAspectRatio(androidx.camera.core.AspectRatio)" rel="nofollow noreferrer">the android developer page</a> setTargetAspectRatio accepts the object AspectRatio, so I tried this:</p>
  
  <pre><code>AspectRatio aspectRatio = new AspectRatio(textureView.getWidth(), textureView.getHeight());
  </code></pre>
  
  <p>However I then get the error, on this line saying 'AspectRatio() has private access in androidx.camera.core.AspectRatio'. 
  I am not sure what this error means as I have imported androidx.camera.core.AspectRatio normally. </p>