无法找到 `RNCPicker` 1.6.0 和 React Native 0.59 所依赖的 `React-Core` 规范
Unable to find a specification for `React-Core` depended upon by `RNCPicker` 1.6.0 with React Native 0.59
当 运行 pod install
for RNCPicker
of version 1.6.0 with React Native 0.59
时,我遇到了这个错误
Analyzing dependencies
[!] Unable to find a specification for `React-Core` depended upon by `RNCPicker`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
就我而言,我必须使用这些特定版本。
我如何摆脱这个错误?
React-Core
已过时并已重命名为 React
我在 ios
下的 Podfile
底部添加了以下行。
def change_lines_in_file(file_path, &change)
print "Fixing #{file_path}...\n"
contents = []
file = File.open(file_path, 'r')
file.each_line do | line |
contents << line
end
file.close
File.open(file_path, 'w') do |f|
f.puts(change.call(contents))
end
end
change_lines_in_file('../node_modules/@react-native-community/picker/RNCPicker.podspec') do |lines|
lines.map { |line| line.include?("s.dependency 'React-Core'") ? "s.dependency 'React'" : line}
end
这样,每当我尝试 运行 pod install
时,它都会找到我过时的 RNCPicker 并将 React-Core
依赖项名称替换为 React
当 运行 pod install
for RNCPicker
of version 1.6.0 with React Native 0.59
Analyzing dependencies
[!] Unable to find a specification for `React-Core` depended upon by `RNCPicker`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
就我而言,我必须使用这些特定版本。 我如何摆脱这个错误?
React-Core
已过时并已重命名为 React
我在 ios
下的 Podfile
底部添加了以下行。
def change_lines_in_file(file_path, &change)
print "Fixing #{file_path}...\n"
contents = []
file = File.open(file_path, 'r')
file.each_line do | line |
contents << line
end
file.close
File.open(file_path, 'w') do |f|
f.puts(change.call(contents))
end
end
change_lines_in_file('../node_modules/@react-native-community/picker/RNCPicker.podspec') do |lines|
lines.map { |line| line.include?("s.dependency 'React-Core'") ? "s.dependency 'React'" : line}
end
这样,每当我尝试 运行 pod install
时,它都会找到我过时的 RNCPicker 并将 React-Core
依赖项名称替换为 React