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

Xcode模拟器运行App触发LLDB目标创建错误(关联Google-Maps-iOS-Utils)求助

解决「Warning: Error creating LLDB target at path」警告(Google-Maps-iOS-Utils 引发)

问题背景

在Xcode 14.3(M1芯片+OSX Ventura系统)环境下,集成Google-Maps-iOS-Utils 4.1.0后,模拟器运行应用时会弹出该警告,且每次都需强制关闭iPhone Simulator才能继续操作。移除该Pod后警告消失,但尝试Stack Overflow常规方案后问题仍未解决。当前Pod依赖包含GoogleUtilities 7.11.1、Google-Maps-iOS-Utils 4.1.0、GoogleMaps 7.4.0。

可行解决方案

1. 升级Google-Maps-iOS-Utils至兼容版本

当前4.1.0版本在M1+Xcode14.3环境存在LLDB兼容性问题,建议升级到最新稳定版(如5.x系列)。修改Podfile后执行以下命令:

pod deintegrate && pod install

2. 为Google-Maps-iOS-Utils添加架构适配配置

在Podfile中加入针对该Pod的编译参数,强制适配arm64模拟器架构:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'Google-Maps-iOS-Utils'
      target.build_configurations.each do |config|
        config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = ''
        config.build_settings['ARCHS[sdk=iphonesimulator*]'] = 'arm64 x86_64'
      end
    end
  end
end

修改完成后重新执行pod install,再通过Cmd+Shift+K清理Xcode缓存后运行项目。

3. 修改LLDB调试路径配置

Xcode 14.3的LLDB版本与该Pod二进制存在冲突,可手动指定调试服务器路径:

  • 打开项目设置 → Run → Arguments → Environment Variables
  • 添加环境变量LLDB_DEBUGSERVER_PATH,值设为/Applications/Xcode.app/Contents/Developer/usr/bin/lldb-server
  • 重启Xcode后重新构建运行

4. 替换为源码集成方式

若上述方案均无效,可放弃CocoaPods集成,直接引入Google-Maps-iOS-Utils源码:

  • 克隆仓库源码,将Sources目录添加到项目中
  • 手动关联GoogleMaps、GoogleUtilities依赖框架

验证步骤

每次修改后需执行以下操作确保生效:

  • 清理Xcode缓存(Cmd+Shift+K)
  • 删除模拟器中的应用并重启模拟器
  • 重新构建项目

内容的提问来源于stack exchange,提问作者weso

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.21 18:22:38