I keep facing this issue.
I tried
1) ./gradlew clean -> npm i -> expo i
2) add this line to build.graddle(:app)
multiDexEnabled true
3) add this line to build.graddle(project)
maven {
url "$rootDir/../node_modules/expo-camera/android/maven"
}
But nothing works.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android:cameraview:1.0.0.
Searched in the following locations:
- file:/Users/hayat/.m2/repository/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
- https://dl.google.com/dl/android/maven2/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
- https://devrepo.kakao.com/nexus/content/groups/public/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
Required by:
project :app > project :expo > project :expo-camera
> Could not find com.github.CanHub:Android-Image-Cropper:1.1.1.
Searched in the following locations:
- file:/Users/hayat/.m2/repository/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
- https://dl.google.com/dl/android/maven2/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
- https://repo.maven.apache.org/maven2/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
- https://devrepo.kakao.com/nexus/content/groups/public/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
Required by:
project :app > project :expo > project :expo-image-picker
* Try:
> 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.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
How to resolve this issue? please help me.
UPDATE June 2024: Expo has finally updated their documentation to reflect this solution. You can find the updated instructions in the Expo Camera documentation here.
Encountered the same issue and solved it by adding the following code block to my android\build.gradle file.
allprojects {
repositories {
// * Your other repositories here *
maven {
// expo-camera bundles a custom com.google.android:cameraview
url "$rootDir/../node_modules/expo-camera/android/maven"
}
}
}
NOTE I believe the instructions given here are kinda misleading. You must add the whole code block. I was only adding the code block below to no success. It's only after adding the whole block above that I was able to successfully build my project
maven {
// expo-camera bundles a custom com.google.android:cameraview
url "$rootDir/../node_modules/expo-camera/android/maven"
}
maven(
url( new File(["node", "--print", "require.resolve('expo-camera/package.json')"].execute(null, rootDir).text.trim(), "../android/maven") )
)
enter image description here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With