Cocoapods +无法为'x'加载底层模块 [英] Cocoapods + Cannot load underlying module for 'x'
问题描述
我正在运行XCode 7,Swift 2.0,iOS 9.
I am running XCode 7, Swift 2.0, iOS 9.
我想使用Cocoapods在我的项目中安装Alamofire。我已完成以下操作:
I want to install Alamofire in my project using Cocoapods. I have done the following:
gem install cocoapods
pod setup
pod init
将Podfile更新为:
Updated Podfile to:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
use_frameworks!
target 'JSONeg' do
pod 'Alamofire', :branch => 'swift-2'
end
然后我安装了pod:
pod install
我添加了以下内容ViewController.swift
And I added the following to ViewController.swift
import Alamofire
此提升以下错误:
无法为'Alamofire'加载基础模块
我测试了另一个pod并且它引发了同样的错误,所以我猜问题是安装Cocoapods。任何帮助将不胜感激。
I tested with another pod and it raised the same error, so I guess the problem is with the installation of Cocoapods. Any help would be greatly appreciated.
推荐答案
这似乎是XCode中的一个错误。我遇到了同样的问题,正如对这个问题的另一个答案的评论中所描述的那样,构建项目会使错误消失。
This seems to be a bug in XCode. I had the same problem, and as described in the comments of another answer to this question, building the project made the error go away.
这篇关于Cocoapods +无法为'x'加载底层模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!