I have the following...
Situation:
I have a react native app (lets call it "MyApp") build on the expo platform. I use eas build
to build the project.
Lately I forked the expo-camera package to update the iOS part to be able to use the ultra wide camera. For now I left the android part untouched. I uploaded my fork to the npm-registry as myApp-expo-camera
and updated the dependency in MyApp from expo-camera
to myApp-expo-camera
Error:
Now when I build iOS it all works as expected, but when I build android it tells me, that it is missing the cameraview
package:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not find com.google.android:cameraview:1.0.0.
Required by:
project :app > project :expo > project :expo-camera
Problem:
This cameraview
package comes with the expo-camera
as an .aar archive. The README.md in expo-camera
says for the installation in a managed expo project to use expo install expo-camera
which is no solution for me since I want to use my fork.
For the installation in a bare react native project it says to add the following to the build.gradle
:
allprojects {
repositories {
// * Your other repositories here *
// * Add a new maven block after other repositories / blocks *
maven {
// expo-camera bundles a custom com.google.android:cameraview
url "$rootDir/../node_modules/expo-camera/android/maven"
}
}
}
As far as I understand I can use "none expo" third party react native packages since I'm using eas build
but I can not add this to the build.gradle
because I'm still in the managed workflow of expo (and therefor do not even have a build.gradle
file).
Does anybody have an idea on how to solve this situation?
Sincerely