首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >项目“Pods”已损坏,无法打开。检查项目文件中是否有无效的编辑或未解决的源代码管理冲突。

项目“Pods”已损坏,无法打开。检查项目文件中是否有无效的编辑或未解决的源代码管理冲突。
EN

Stack Overflow用户
提问于 2022-05-12 10:39:58
回答 1查看 274关注 0票数 0

我的“荚”安装后,没有被Xcode识别,并导致我的构建失败。

这是我试图从Pods/Pods.xcodeproj打开豆荚时收到的信息。

项目“Pods”已损坏,无法打开。检查项目文件中的无效编辑或未解决的源代码管理冲突。

这是我的文件:

代码语言:javascript
复制
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false


target 'applicationTemplate' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  # Pods for applicationTemplate
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])
  pod 'RNFBAnalytics', :path => '../node_modules/@react-native-firebase/analytics'
  pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
  pod 'react-native-webview', :path => '../node_modules/react-native-webview'
  pod 'react-native-voice', :path => '../node_modules/react-native-voice'
  pod 'react-native-torch', :path => '../node_modules/react-native-torch'
  pod 'RNKeychain', :path => '../node_modules/react-native-keychain'
  
  pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'

  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

  pod 'RNOpenAppSettings', :path => '../node_modules/react-native-app-settings'

  target 'applicationTemplateTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'applicationTemplate-tvOS' do
  # Pods for applicationTemplate-tvOS

  target 'applicationTemplate-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

# App Tracking Transparency https://rnfirebase.io/analytics/usage#disable-ad-id-usage-on-ios
$RNFirebaseAnalyticsWithoutAdIdSupport = true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-config'
      phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
      phase.shell_script = "cd ../../"\
      " && RNC_ROOT=./node_modules/react-native-config/"\
      " && export SYMROOT=$RNC_ROOT/ios/ReactNativeConfig"\
      " && ruby $RNC_ROOT/ios/ReactNativeConfig/BuildDotenvConfig.ruby"
      
      target.build_phases << phase
      target.build_phases.move(phase,0)
    end
  end
  react_native_post_install(installer)
  __apply_Xcode_12_5_M1_post_install_workaround(installer)
 end
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-05-12 10:39:58

我就是这样解决这个问题的:

只需删除这一行:install! 'cocoapods', :deterministic_uuids => false并运行pod deintegrate && pod cache clean --all && pod install

我添加它是因为我使用的是react本机升级助手,并且我在他们的podfile中看到他们是这一行,所以我添加了它,但是显然它并不适用于每一次升级,所以对升级助手要小心。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72214120

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档