xcode - 无法从路径 Frameworks/RCTVibration.framework/Info.plist 的包中加载 Info.plist:没有这样的文件或目录(React Native)
问题描述
我已经有几个小时的问题了,我不知道它是从哪里来的,我要开始哭了。
在模拟器上启动应用程序时,在我的 Xcode 构建结束时出现的错误:
Failed to load Info.plist from bundle at path /INSERT A BIG PATH HERE/Frameworks/RCTVibration.framework;
Couldn't stat /INSERT A BIG PATH HERE/RCTVibration.framework/Info.plist: No such file or directory
我已经尝试了几次:
- 吊舱解体 && 吊舱安装
- 删除 node_modules
- 清理构建文件夹
- 重新启动我的电脑
- 重新克隆我的项目
- 多次擦除我的模拟器
- 从 Xcode 中擦除派生数据
这是我的 Podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'X' do
config = use_native_modules!
use_frameworks!
# Convert all permission pods into static libraries
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-') || pod.name.eql?('RNScreens')
def pod.build_type;
Pod::BuildType.static_library # >= 1.9
end
end
end
end
pod 'X'
pod 'Firebase/Crashlytics'
# Recommended: Add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
use_react_native!(
:path => config[:reactNativePath]
)
rn_maps_path = '../node_modules/react-native-maps'
# pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
post_install do |installer|
react_native_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
if (target.name&.eql?('FBReactNativeSpec'))
target.build_phases.each do |build_phase|
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
target.build_phases.move(build_phase, 0)
end
end
end
end
end
end
这些操作都不起作用,所以如果您有任何想法,我很感兴趣
编辑:我刚刚用临时/缓存文件干净地卸载了 XCode 并重新安装,注意在编译之前从模拟器中删除所有数据,但同样的问题。
解决方案
推荐阅读
- java - Feign : 文件上传配置
- c# - 带有 TypedParameter 的 Autofac Resolve 总是首先选择预期的相同类型参数?
- python - 根据odoo中Many2one字段的值更改One2many字段
- java - 如何在片段中获得活动?
- java - 在房间数据库中插入用户时显示错误
- powershell - Defender Preference PowerShell 命令与相应的注册表项不同
- javascript - Angular 与 ngrx - 没有任何事情发生
- vue.js - 尝试导入时出现 Uncaught SyntaxError: Unexpected identifier error
- hadoop - 安全 Hadoop - 在后台启动 Datanode
- java - Spring Transaction @Transactional 注释不起作用