11

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.

1
  • Did you get a solution to this? Been encountering the same issue Commented Feb 16, 2023 at 14:07

3 Answers 3

33

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"
        }
Sign up to request clarification or add additional context in comments.

2 Comments

I felt into that one described in your notes. I added the maven block to the current definition and not added the entire allprojects block. I fixed it and worked. Thanks.
Very misleading instruction indeed... Thank you for figuring this out
2
   maven(
       url( new File(["node", "--print", "require.resolve('expo-camera/package.json')"].execute(null, rootDir).text.trim(), "../android/maven") )
    )

enter image description here

Comments

-3

with just removing the folders android and ios from my building in expo, and follow the npx -y expo-doctor guidance.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.