gpt4 book ai didi

React-native 依赖错误(com.atlassian.mobile.video okhttp-ws-compat)

转载 作者:行者123 更新时间:2023-11-29 02:40:52 27 4
gpt4 key购买 nike

我正在开发一个 React-native 应用程序,突然间我开始收到以下错误:

  • What went wrong: A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-config'. Could not resolve all dependencies for configuration ':react-native-config:_debugPublishCopy'. Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1. Required by: cabm8:react-native-config:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1

我摆脱了模块 react-native-config 但仍然面临类似的错误:

  • What went wrong: A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-maps'. Could not resolve all dependencies for configuration ':react-native-maps:_debugPublishCopy'. Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1. Required by: cabm8:react-native-maps:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1

这个问题似乎与 com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1 有某种关系。

我尝试重新安装 node_modules,删除文件夹 androidios 然后使用 git 恢复它们。我还能尝试什么?

最佳答案

在你的 build.gradle 中(不是在 android/app/build.gradle 中)添加这行以强制所有依赖于 react-native 到特定版本:

allprojects {

configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
details.useVersion "0.39.0" // Your real React Native version here
}
}
}
}
...
}

此配置对我有用。我希望这会有所帮助。

关于React-native 依赖错误(com.atlassian.mobile.video okhttp-ws-compat),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44232992/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com