Swift pod 還不能集成為靜態庫 (Swift pods cannot yet be integrated as static libraries)


問題描述

Swift pod 還不能集成為靜態庫 (Swift pods cannot yet be integrated as static libraries)

我正在通過 Flutter 構建一個應用程序。我在執行“pod install”時收到此錯誤消息。並且 pod 安裝失敗並停止。

錯誤消息:

[!] 以下 Swift pod 尚無法集成為靜態庫:

Swift pod DKPhotoGallery 依賴於不定義模塊的 SDWebImageSDWebImageFLPlugin。要選擇生成模塊映射的目標(在構建為靜態庫時需要從 Swift 導入它們),您可以在 Podfile 中全局設置 use_modular_headers! ,或指定 :modular_headers => ; true 用於特定的依賴項。

我應該在哪裡設置“use_modular_headers!” 在 Podfile 中?謝謝!


參考解法

方法 1:

I tried out the solution. "use_frameworks!" should be added here in 'ios/Podfile':

.
.
.
target 'Runner' do
      # Flutter Pod

      use_frameworks! #add here

      copied_flutter_dir = File.join(__dir__, 'Flutter')
      copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
      copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
.
.
.

方法 2:

With cocoapods 1.9 a new command is shipped use_frameworks! :linkage => :static which allows static linking

方法 3:

those seem are not define modules. in your Podfile add:

pod 'YOUR_PACKAGE_NAME', :modular_headers => true

方法 4:

I had the same issue but none of the solutions worked for me.

 target 'Runner' do use_frameworks! use_modular_headers!

 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
 pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git', :modular_headers => true //this is the library i was getting error.
 end

(by dreamkastdreamkastKarstenAmirRahul sharma)

參考文件

  1. Swift pods cannot yet be integrated as static libraries (CC BY‑SA 2.5/3.0/4.0)

#cocoapods #Flutter






相關問題

使用 pod 文件安裝和更新 SDWebImage 時出錯 (Error while installing and updating SDWebImage with pod file)

ld: 未找到框架 AFNetworking (ld: framework not found AFNetworking)

Xcode Openframeworks - ld:找不到-lLeap的庫 (Xcode Openframeworks - ld: library not found for -lLeap)

iOS,ld:未找到架構 arm64 的 GoogleMaps 框架 (iOS , ld: framework not found GoogleMaps for architecture arm64)

創建一個 CocoaPod (Creating a CocoaPod)

全局 .gitIgnore 文件的內容是什麼? (What is the content of global .gitIgnore file?)

無法推送我的 pod (Unable to push my pod)

RxSwift - Playground 執行失敗:無法查找符號 (RxSwift - Playground execution failed: Couldn't lookup symbols)

將胖二進制框架添加到 Artifactory Cocoapods 存儲庫 (Adding a fat binary framework to Artifactory Cocoapods repository)

通過 Cocoapods 安裝後無法導入庫 (Cant import library after installing via Cocoapods)

為什麼在創建反應原生應用程序時安裝 cocoapods 依賴項失敗? (why is cocoapods dependency installed failed when creating a react native app?)

Swift pod 還不能集成為靜態庫 (Swift pods cannot yet be integrated as static libraries)







留言討論