expo: Not published plugin in expo-camera package breaks the EAS build for android
Summary
Latest changes introduced with this commit fixed the problem, but are not published in the sdk 43.0.0.
Running eas build for android breaks, producing the following error in Run gradlew step:
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ‘:expo:generateReleaseRFile’.
[stderr] > Could not resolve all files for configuration ‘:expo:releaseCompileClasspath’.
[stderr] > Could not find com.google.android:cameraview:1.0.0.
[stderr] Required by:
[stderr] project :expo > project :expo-camera
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
43.0.0
Environment
Expo CLI 4.12.8 environment info: System: OS: macOS 11.4 Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.5 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.14 - /usr/local/bin/npm Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 30 Build Tools: 29.0.2, 30.0.3, 31.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64 IDEs: Xcode: 13.0/13A233 - /usr/bin/xcodebuild npmPackages: expo: 43.0.0 => 43.0.0 react-native: 0.64.2 => 0.64.2 npmGlobalPackages: expo-cli: 4.4.4 Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
Using expo-camera 12.0.3 in a monorepo project and creating eas build for android.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (3 by maintainers)
adding
allprojects { repositories { maven { // expo-camera bundles a custom com.google.android:cameraview url "$rootDir/../node_modules/expo-camera/android/maven" } } }inandroid/build.gradleseems to have worked for me.Please reopen, I have this error back in expo sdk46 (bare), running npx expo run:android
@roadmanfong, @Warqus, The only workaround to the issue I experienced - until a new version of expo-camera is released - is a custom dev-client plugin to properly set the android maven path for expo-camera. (It is currently hard coded in a way that doesn’t work with monorepos.) @byCedric demonstrates how to do this in my example repo linked above. If you are already using the dev-client, it’s a minor change and resolves the issue. The example repo shows the whole implementation.
hi there! minimal reproducible examples are required for bug reports. please see https://stackoverflow.com/help/minimal-reproducible-example for more information on how to create one