You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native 0.75.4项目CocoaPods兼容性问题:React-RuntimeHermes Pod未找到

解决React Native 0.75.4中React-RuntimeHermes的CocoaPods兼容问题

排查与修复步骤

  • 清理CocoaPods缓存
    彻底清除本地Pods缓存和项目残留文件,执行以下命令:

    pod deintegrate
    rm -rf Pods
    rm Podfile.lock
    rm -rf ~/Library/Caches/CocoaPods
    rm -rf ~/.cocoapods/repos
    pod repo update
    

    完成后重新运行pod install。

  • 检查Podfile配置
    确保Podfile中Hermes相关配置为默认状态,React Native 0.75.x默认启用Hermes,不要手动指定React-RuntimeHermes的版本,让CocoaPods自动匹配RN版本:

    use_react_native!(
      :path => config[:reactNativePath],
      :hermes_enabled => true # 0.75.x默认值,无需修改
    )
    
  • 确认依赖完整性
    检查node_modules/react-native是否完整,可能存在依赖安装异常,执行:

    rm -rf node_modules
    rm package-lock.json yarn.lock
    npm install # 或 yarn install
    cd ios && pod install
    

兼容版本参考

React Native 0.75.x系列(含0.75.4)官方绑定的Hermes版本是0.11.0,两者是原生兼容的,出现版本不兼容提示基本都是缓存或安装流程问题,而非版本本身不匹配。

如果上述操作无效,可以尝试:

  • 降级到React Native 0.75.3(同系列稳定版,绑定Hermes 0.11.0)
  • 升级到React Native 0.76.x(绑定Hermes 0.12.0,修复了部分Pods适配问题)

这两个版本均能良好适配iOS 12.0及以上版本。

内容的提问来源于stack exchange,提问作者D.S

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 01:52:06