my space

Expo Camera set up in Bare workflow


May 11, 2020

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

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"

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


Written by gie who lives and works in Bangkok. Build things by code.
my twitter | github