Project with path ':unimodules-core' could not be found in project ':@unimodules_react-native-adapter'

Viewed 13261

Taking over RN project from another developer and trying to make a build for Android, however Gradle keeps giving me this issue:

ERROR: Project with path ':unimodules-core' could not be found in project ':@unimodules_react-native-adapter'.

The only solution I could find regarding this is adding settings.gradle file:

include ':@unimodules_react-native-adapter'
project(':@unimodules_react-native-adapter').projectDir = new File(rootProject.projectDir, '../node_modules/@unimodules/react-native-adapter/android')

but this doesn't work for me.

I have linked the native dependecies I have tried npm and yarn

Project is using:

 "@unimodules/core": "^3.0.2",
 "@unimodules/react-native-adapter": "^3.0.0",

Gradle is directing me to the @unimodules/react-native-adapter/android/build.gradle file:

apply from: project(":unimodules-core").file("../unimodules-core.gradle")

Any guidance of what could possible be wrong, would greatly be appreciated

5 Answers

Something that solved this for me was removing: @unimodules/react-native-adapter from dependencies entirely.

I solved my issue by installing react-native-unimodules.

$> yarn add react-native-unimodules

Managed to fix it by deleting project, cloning it again and only running yarn instead of trying npm and yarn.

To resolve this, you can try using npm to:

1- Remove from your package.json

this line: "@unimodules/core": "^3.0.2",

on "dependencies": { part

2- Install the unimodules-core package:

with npm:

npm install @unimodules/core --save

you can do identical thing with yarn , you can take a look to the official doc: https://www.npmjs.com/package/@unimodules/core?activeTab=readme

For me, the issue was using expo packages (e.g. "import * as Crypto from 'expo-crypto"). I removed them and the problem went away.

Related