Could not determine the dependencies of task ':app:buildReleasePreBundle'.

when building the application I get an error, I’m using eas build , on the android platform

Erro

Could not determine the dependencies of task ‘:app:buildReleasePreBundle’.
Could not resolve all task dependencies for configuration ‘:app:releaseRuntimeClasspath’.
Could not find com.google.android:cameraview:1.0.0.
Build failed: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.

package.json

{
  "scripts": {
    "start": "expo start --dev-client",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-community/slider": "4.4.2",
    "@react-native-picker/picker": "2.4.8",
    "@react-navigation/bottom-tabs": "^5.11.11",
    "@react-navigation/native": "^5.9.4",
    "@react-navigation/stack": "^5.14.5",
    "axios": "^0.21.1",
    "expo": "~48.0.6",
    "expo-av": "~13.2.1",
    "expo-barcode-scanner": "~12.3.2",
    "expo-camera": "~13.2.1",
    "expo-constants": "~14.2.1",
    "expo-file-system": "~15.2.2",
    "expo-notifications": "~0.18.1",
    "expo-print": "~12.2.1",
    "expo-sharing": "~11.2.2",
    "expo-splash-screen": "~0.18.1",
    "expo-sqlite": "~11.1.1",
    "expo-status-bar": "~1.4.4",
    "expo-updates": "~0.16.3",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.3",
    "react-native-animatable": "^1.3.3",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-masked-text": "^1.13.0",
    "react-native-modalize": "^2.0.13",
    "react-native-reanimated": "^3.0.2",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "~0.18.10",
    "react-native-webview": "11.26.0",
    "styled-components": "^5.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "^18.0.28",
    "@types/react-native": "~0.67.6",
    "typescript": "^4.9.4"
  },
  "private": true,
  "name": "XXXXXXX",
  "version": "1.0.0"
}

I already updated all dependencies, as it updated sdk to 48.

Run gradlew

Running 'gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.5.1-all.zip
10%.
20%.
30%.
40%.
50%
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 7.5.1!
Here are the highlights of this release:
 - Support for Java 18
 - Support for building with Groovy 4
 - Much more responsive continuous builds
 - Improved diagnostics for dependency resolution
For more details see https://docs.gradle.org/7.5.1/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Task :react-native-gradle-plugin:pluginDescriptors
> Task :react-native-gradle-plugin:processResources
> Task :react-native-gradle-plugin:compileKotlin
> Task :react-native-gradle-plugin:compileJava NO-SOURCE
> Task :react-native-gradle-plugin:classes
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC
> Task :react-native-gradle-plugin:jar
> Configure project :expo-application
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-av
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
Checking the license for package NDK (Side by side) 23.1.7779620 in /home/expo/Android/Sdk/licenses
License for package NDK (Side by side) 23.1.7779620 accepted.
Preparing "Install NDK (Side by side) 23.1.7779620 (revision: 23.1.7779620)".
"Install NDK (Side by side) 23.1.7779620 (revision: 23.1.7779620)" ready.
Installing NDK (Side by side) 23.1.7779620 in /home/expo/Android/Sdk/ndk/23.1.7779620
"Install NDK (Side by side) 23.1.7779620 (revision: 23.1.7779620)" complete.
"Install NDK (Side by side) 23.1.7779620 (revision: 23.1.7779620)" finished.
Checking the license for package CMake 3.22.1 in /home/expo/Android/Sdk/licenses
License for package CMake 3.22.1 accepted.
Preparing "Install CMake 3.22.1 (revision: 3.22.1)".
"Install CMake 3.22.1 (revision: 3.22.1)" ready.
Installing CMake 3.22.1 in /home/expo/Android/Sdk/cmake/3.22.1
"Install CMake 3.22.1 (revision: 3.22.1)" complete.
"Install CMake 3.22.1 (revision: 3.22.1)" finished.
> Configure project :expo-barcode-scanner
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-camera
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-constants
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-eas-client
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-file-system
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-font
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-image-loader
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-json-utils
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-keep-awake
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-manifests
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-modules-core
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-notifications
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-print
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-sharing
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-splash-screen
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-sqlite
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-structured-headers
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-updates
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-updates-interface
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo
Using expo modules
  - expo-application (5.1.1)
  - expo-av (13.2.1)
  - expo-barcode-scanner (12.3.2)
  - expo-camera (13.2.1)
  - expo-constants (14.2.1)
- expo-eas-client (0.5.1)
  - expo-file-system (15.2.2)
  - expo-font (11.1.1)
  - expo-image-loader (4.1.1)
  - expo-json-utils (0.5.1)
  - expo-keep-awake (12.0.1)
  - expo-manifests (0.5.2)
  - expo-modules-core (1.2.4)
  - expo-notifications (0.18.1)
  - expo-print (12.2.1)
  - expo-sharing (11.2.2)
  - expo-splash-screen (0.18.1)
  - expo-sqlite (11.1.1)
  - expo-structured-headers (3.1.1)
  - expo-updates (0.16.3)
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
/home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-71-hermes.aar
[stderr] 
FAILURE:
[stderr] 
Build failed with an exception.
[stderr] 
* What went wrong:
[stderr] 
Could not determine the dependencies of task ':app:buildReleasePreBundle'.
[stderr] 
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
[stderr] 
   > Could not find com.google.android:cameraview:1.0.0.
[stderr] 
     Searched in the following locations:
[stderr] 
       - http://10.4.1.4:8081/artifactory/libs-release/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
       - file:/home/expo/workingdir/build/node_modules/react-native/android/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
       - file:/home/expo/workingdir/build/node_modules/jsc-android/dist/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
- https://dl.google.com/dl/android/maven2/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
       - https://repo.maven.apache.org/maven2/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
       - https://www.jitpack.io/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
- https://oss.sonatype.org/content/repositories/snapshots/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
[stderr] 
     Required by:
[stderr] 
         project :app > project :expo > project :expo-camera
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
* Get more help at https://help.gradle.org
[stderr] 
BUILD FAILED in 3m 22s
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

I ran this command that I found on a git hub forum and it worked.

comand : npx expo prebuild --clean

forum link : How to ship multiple apps from same codebase ? · expo/expo · Discussion #20295 · GitHub

Hi @devcaioeduardo

It sounds like your app would work fine without prebuilding and prebuild is just complicating things for you.

Given that just running npm expo prebuild --clean fixed it for you, another way to solve it would be to delete your android and ios directories. This would switch you back to the managed workflow.

Thank you very much , this is the most ideal solution .

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.