Search code examples
javaandroidandroid-camerax

PreviewView isn't available in my AndroidStudio?


I am attempting to implement a basic camera application using a PreviewView. However, in my android studio, PreviewViews aren't listed. Any suggestions as to how to find it? Or potential workarounds?

PreviewView not

Dependencies

Many thanks, Alex


Solution

  • You need to add camera-view dependency in your build.gradle file like this

    implementation 'androidx.camera:camera-view:1.0.0-alpha26'