`错误警告发现多个 Podfiles:` 当创建一个新的反应本机应用程序时

问题描述 投票:0回答:0

我正在使用以下方法创建一个新的本机反应应用程序:

npx react-native@latest init AwesomeProject

但是我收到这个错误:

✔ Downloading template
✔ Copying template
✔ Processing template
✔ Installing Bundler
✖ Installing CocoaPods dependencies (this may take a few minutes)
error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md

我尝试使用 --template 选项创建项目以指定要使用的模板。

npx react-native init MyProject --template react-native-template-ios-basic

但这给了我不同的错误。

xcode react-native cocoapods command-line-interface zsh
© www.soinside.com 2019 - 2024. All rights reserved.