【问题标题】:> Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available> 找不到 com.facebook.react:react-native:+ 的任何匹配项,因为没有可用的 com.facebook.react:react-native 版本
【发布时间】:2023-01-03 19:00:15
【问题描述】:

显然有一个 RN 中断。现在,这会导致很多问题,因为我可以进行构建。

https://github.com/facebook/react-native/issues/35210

但是那个“FIX”说要看https://github.com/facebook/react-native/issues/35210#:~:text=We%20have%20prepared%20releases%20for%20all%20the%20main%20versions%20of%20react%2Dnative%20with%20an%20hotfix%3A

问题是没有提到 0.71.0-RC.0 版本修复,我在那个版本上,当我尝试运行 npx react-native run-android 时,我得到以下信息:

   > Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.

如果有人遇到这个问题,您能否提及您是如何解决这个问题的?我不明白具体针对我的情况的修复方法。

这是当我运行 react-native info 时终端吐出的内容:

System:
OS: macOS 13.0
CPU: (8) arm64 Apple M1
Memory: 129.47 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.5.5 - /opt/homebrew/bin/npm
Watchman: 2022.09.05.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
  Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0 
react-native: 0.71.0-rc.0 => 0.71.0-rc.0 
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found

如果我应该添加更多信息,请告诉我。

【问题讨论】:

    标签: react-native


    【解决方案1】:

    通过将我的 RN 版本升级到带有补丁的版本之一来修复

    【讨论】:

      【解决方案2】:

      只是为了确保每个人都明白这一点,是的@Grant Solomons 说对了。

      所以如果在你的package.json文件中你有"react-native": "^0.70.0",,删除^"react-native": "0.70.0",

      【讨论】:

        猜你喜欢
        • 2023-01-30
        • 2022-07-12
        • 1970-01-01
        • 2022-11-06
        • 2022-06-19
        • 2019-05-11
        • 2016-12-15
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多