首页 > 解决方案 > 在项目 ':@unimodules_react-native-adapter' 中找不到路径为 ':unimodules-core' 的项目

问题描述

从另一个开发人员那里接管 RN 项目并尝试为 Android 构建,但是 Gradle 一直给我这个问题:

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

我能找到的唯一解决方案是添加 settings.gradle 文件:

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

但这对我不起作用。

我已经链接了我尝试过 npm 和 yarn 的本地依赖项

项目正在使用:

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

Gradle 将我引导至@unimodules/react-native-adapter/android/build.gradle文件:

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

任何可能出错的指导,将不胜感激

标签: androidreact-nativegradle

解决方案


为我解决这个问题的方法是@unimodules/react-native-adapter完全删除:从依赖项中。


推荐阅读