作者:王强丫ES | 来源:互联网 | 2022-11-30 13:11
1> Vinzzz..:
这是react-native-fabric
自己的build.gradle文件...和JCenter maven存储库的问题.
在他们的github上看看这个问题:https:
//github.com/corymsmith/react-native-fabric/issues/200
基本上,您可以通过直接编辑node_module/react-native-fabric/android/build.gradle
文件来解锁自己(更改maven存储库顺序,将Jcenter向下移动Google)
他们必须为这个修复版本发布一个NPM版本......
编辑
实际上,如果你不想编辑你的node_module
.build.gradle,您可以在根项目build.gradle(android/build.gradle
)中覆盖此设置.这是我修改它的配置(我不是Gradle专家,你的可能会有所不同)
allprojects {
repositories {
mavenLocal()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Firebase : Google Play services from 11.2.0 +
url 'https://maven.google.com'
}
jcenter()
configurations.all {
resolutionStrategy {
// fix dependency problem on react-native-maps 0.20.1
//force "com.android.support:support-v4:27.1.0"
}
}
}
buildscript {
repositories {
mavenLocal()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Firebase : Google Play services from 11.2.0 +
url 'https://maven.google.com'
}
jcenter()
configurations.all {
resolutionStrategy {
// fix dependency problem on react-native-maps 0.20.1
//force "com.android.support:support-v4:27.1.0"
}
}
}
}
}