Skip to content

Build fails due to incorrect dependency #440

@manuelhuber

Description

@manuelhuber

Description

I npm installed latest react-native-executorch, and tried to build with expo run build:android -p but it fails due to Could not find com.github.software-mansion:react-native-executorch:v0.4.5
Checking the repo URL I saw that there's no version 4.5, so I manually updated it to 4.6 and it worked.
This is the error from my build. Underneath a screenshot of where I manually updated the dependency to fix the issue.

$ npx expo run:android
› Building app...
Starting a Gradle Daemon (subsequent builds will be faster)
Configuration on demand is an incubating feature.

> Configure project :
[ExpoRootProject] Using the following versions:
  - buildTools:  35.0.0
  - minSdk:      24
  - compileSdk:  35
  - targetSdk:   35
  - ndk:         27.1.12297006
  - kotlin:      2.0.21
  - ksp:         2.0.21-1.0.28

> Configure project :expo

Using expo modules
  - expo-constants (17.1.6)
  - expo-file-system (18.1.10)
  - expo-linking (7.1.5)
  - expo-modules-core (2.4.0)NG [43s]
  - [?] expo-asset (11.1.5)
  - [?] expo-blur (14.1.5)
  - [?] expo-font (13.3.1)
  - [?] expo-haptics (14.1.4)
  - [?] expo-image (2.3.0)
  - [?] expo-keep-awake (14.1.4)
  - [?] expo-localization (16.1.5)
  - [?] expo-splash-screen (0.30.9)
  - [?] expo-system-ui (5.0.9)
  - [?] expo-web-browser (14.2.0)


> Configure project :react-native-reanimated
Android gradle plugin: 8.8.2
Gradle: 8.13

[Incubating] Problems report is available at: file:///C:/Users/nelo1/projects/pagthon/pagthon/android/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.software-mansion:react-native-executorch:v0.4.5.
     Searched in the following locations:
       - file:/C:/Users/nelo1/projects/pagthon/pagthon/node_modules/react-native/android/com/github/software-mansion/react-native-executorch/v0.4.5/react-native-executorch-v0.4.5.pom
       - https://dl.google.com/dl/android/maven2/com/github/software-mansion/react-native-executorch/v0.4.5/react-native-executorch-v0.4.5.pom
       - https://repo.maven.apache.org/maven2/com/github/software-mansion/react-native-executorch/v0.4.5/react-native-executorch-v0.4.5.pom
       - https://www.jitpack.io/com/github/software-mansion/react-native-executorch/v0.4.5/react-native-executorch-v0.4.5.pom
       - https://central.sonatype.com/repository/maven-snapshots/com/github/software-mansion/react-native-executorch/v0.4.5/react-native-executorch-v0.4.5.pom
     Required by:
         project :app > project :react-native-executorch

* 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 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 2m 4s
28 actionable tasks: 4 executed, 24 up-to-date
Error: C:\Users\nelo1\projects\pagthon\pagthon\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
Error: C:\Users\nelo1\projects\pagthon\pagthon\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
    at ChildProcess.completionListener (C:\Users\nelo1\projects\pagthon\pagthon\node_modules\@expo\spawn-async\src\spawnAsync.ts:67:13)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at ChildProcess.cp.emit (C:\Users\nelo1\projects\pagthon\pagthon\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1101:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
    ...
    at spawnAsync (C:\Users\nelo1\projects\pagthon\pagthon\node_modules\@expo\spawn-async\src\spawnAsync.ts:28:21)
    at spawnGradleAsync (C:\Users\nelo1\projects\pagthon\pagthon\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:134:28)
    at assembleAsync (C:\Users\nelo1\projects\pagthon\pagthon\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:83:16)
    at runAndroidAsync (C:\Users\nelo1\projects\pagthon\pagthon\node_modules\@expo\cli\src\run\android\runAndroidAsync.ts:62:24)
Image

Steps to reproduce

  1. npm install react-native-executorch
    Which currently installs version 4.6 (package.json shows "react-native-executorch": "^0.4.6")
  2. expo run build:android -p
  3. Observe failure
  4. Go to node_modules/react-native-executorch/android/build.gradle
  5. Update version to 0.4.6 in this line implementation("com.github.software-mansion:react-native-executorch:v0.4.5")
  6. Run expo run build:android -p again.
  7. Observe functional build

Snack or a link to a repository

No response

React Native Executorch version

0.4.6

React Native version

0.79.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

None

Architecture

None

Build type

None

Device

Real device

Device model

No response

AI model

No response

Performance logs

No response

Acknowledgements

Yes

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions