【发布时间】:2018-10-25 13:36:37
【问题描述】:
我们使用的是 react-native 0.43.4 版本,并且我们对它进行了分叉。 它正在通过 npm install 下载。
package.json
"react-native": "git+ssh://git@subdomain.domain.net/username/react-native#fix/xcode_9_3",
我们的 Android 项目级 gradle 文件有
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
它工作了将近一年。我们的 android 项目使用的是 node_modules 目录内的 react-native。但是今天,gradle 自动从 jcenter 下载了 react-native 0.55.3。
这张图片展示了我们从 jcenter 下载的 react-native
我们试过了
repositories {
jcenter {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
但它不起作用。
任何想法如何解决这个问题?
【问题讨论】:
-
我的 Android 项目也突然停止工作了。
-
This issue 在他们的 GitHub 上解释出了什么问题
-
谢谢,我们会试试这个,但我正在考虑其他模块依赖项,如 react-native-facebooksdk、react-native-google-anakytics 等。我希望这也会强制其他模块版本。
标签: android maven react-native gradle jcenter