DEV Community


Posted on

Expo Camera set up in Bare workflow

Found a difficulty when I tried to eject an app with expo-camera from Expo Managed into Bare workflow. Our team managed to solve this problem and I blog it as a reference

From my experience, it's simple to use most of expo component in the Bare workflow until I come across expo-camera. I expected it to be managed by react-native-unimodules. However, thing wasn't that simple. This is the error I observed during gradle build:

ERROR: Failed to resolve:
Show in Project Structure dialog
Affected Modules: app
Enter fullscreen mode Exit fullscreen mode

This can be fixed by applying this into build.gradle

allprojects {
    repositories {
        ...your code
        maven {
            // expo-camera bundles a custom
            url "$rootDir/../node_modules/expo-camera/android/maven"
Enter fullscreen mode Exit fullscreen mode

and you're good to go!

The hardest part is the above hasn't been stated in the component reference. But it's located deeply in its github repo here

Discussion (0)