The library works on API 15+, which is the only requirement and should be met by most projects nowadays.
It is publicly hosted on Maven Central, where you can download the AAR package. To fetch with Gradle, make sure you add the Maven Central repository:
repositories {
mavenCentral()
}
Then simply download the latest version:
api("com.otaliastudios:cameraview:2.7.2")
No other configuration steps are needed. If you want to try features that were not released yet, you can pull the latest snapshot by adding the Sonatype snapshot repository:
repositories {
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
And depending on the latest-SNAPSHOT version:
api("com.otaliastudios:cameraview:latest-SNAPSHOT")