首页 文章

如何在swift 3中解决“ld:框架未找到Alamofire”

提问于
浏览
1

我的项目运行正常,但是当我添加alamofire并且它无法运行时 .

它给出了以下错误

ld:警告:找不到选项'-F / Users / banglafire / Desktop / mysios / Build / Products / Debug-iphonesimulator / Alamofire'ld的目录:未找到框架Alamofire clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

additional information

Cocopad版本1.3.1

我的pod文件

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

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

  # Pods for My
  pod 'Alamofire'

end

我该如何解决?请帮忙!

4 回答

  • 0

    尝试添加alamofire的版本

    pod'Alamofire','〜> 4.5'

    然后运行pod install

  • 0

    您是否已经在项目文件夹中更新了pod?

    还要检查你的吊舱是否正确 .

    https://github.com/Alamofire/Alamofire

    在项目中添加pod时,仍需要更新文件夹 .

    尝试使用终端 - >然后转到你的文件夹项目 - >输入 pod install

  • 0

    我认为您的Pod文件存在一些问题,如下所示:

    # Uncomment the next line to define a global platform for your project
    
    platform :ios, '9.0'
    
    target 'My' do
     # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
     use_frameworks!
    
    pod 'Alamofire', '~> 4.4'
    
       target 'MyTests' do
    
       inherit! :search_paths
       # Pods for testing
       end
    
       target 'MyUITests' do
    
       inherit! :search_paths
       # Pods for testing
       end
    
    end
    

    尝试删除Pod文件并再次安装pod文件并添加类似pod的文件 . 希望这可以帮到你 .

  • 0

    我最近也遇到过这个问题 . 我在这里尝试了很多建议的修复,但它们都没有解决问题 .

    实际问题是在应用程序的“生成设置”中设置的值不正确 .

    将Per-configuration Build Products Path设置为:

    CONFIGURATION_BUILD_DIR = $(BUILD_DIR)/ $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

    问题解决了,我的构建成功了 .

相关问题