首页 > 解决方案 > 编译 xcode 项目时 Alamofire 的大量问题

问题描述

我正在轻柔地运行我的程序,在某些时候(可能关闭 Xcode 以重新打开或更新 pod 文件)它突然无法编译了。

我已经尝试打开 .xcodeproj 和 .xcworkspace。第一个在编译时显示此消息:

xcodeproj

第二种情况显示了很多问题:

xcworkspace

这是我的 pod 文件:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

source 'https://github.com/CocoaPods/Specs.git'

target 'HonoluluArt' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks



  # Pods for HonoluluArt
    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '8.0'
    use_frameworks!

    pod 'Alamofire', '~> 3.0'

    pod 'GoogleMaps'
    pod 'GooglePlaces'
end

我能得到任何帮助吗?非常感谢!

标签: iosswiftxcodealamofire

解决方案


尝试清除 pod 并重新安装:

  1. 在项目文件夹中执行:pod deintegrate

  2. 然后清洁豆荚:pod clean

  3. 重新安装 pod:pod install

这应该工作

另外,如果您不需要特别Alamofire删除v3~> 3来安装最新版本并修改您的 Podfile:

target 'HonoluluArt' do
use_frameworks!
    pod 'Alamofire'
    pod 'GoogleMaps'
    pod 'GooglePlaces'
end

推荐阅读