簡體   English   中英

ld:找不到 -lFirebaseCore clang 的庫:錯誤:鏈接器命令失敗,退出代碼為 1(使用 -v 查看調用)

[英]ld: library not found for -lFirebaseCore clang: error: linker command failed with exit code 1 (use -v to see invocation)

我使用react-native-fcm進行遠程推送通知,但它給出了這個錯誤:

ld:找不到 -lFirebaseCore clang 的庫:錯誤:鏈接器命令失敗,退出代碼為 1(使用 -v 查看調用)

莢:

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

target 'SefrTaSad' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for SefrTaSad

  pod 'Firebase'
  pod 'Firebase/Messaging'

end

Podfile.lock:

PODS:
  - Firebase (5.5.0):
    - Firebase/Core (= 5.5.0)
  - Firebase/Core (5.5.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 5.1.0)
  - Firebase/CoreOnly (5.5.0):
    - FirebaseCore (= 5.1.0)
  - Firebase/Messaging (5.5.0):
    - Firebase/CoreOnly
    - FirebaseMessaging (= 3.1.0)
  - FirebaseAnalytics (5.1.0):
    - FirebaseCore (~> 5.1)
    - FirebaseInstanceID (~> 3.2)
    - GoogleAppMeasurement (~> 5.1)
    - GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
    - GoogleUtilities/MethodSwizzler (~> 5.2.0)
    - GoogleUtilities/Network (~> 5.2)
    - "GoogleUtilities/NSData+zlib (~> 5.2)"
    - nanopb (~> 0.3)
  - FirebaseCore (5.1.0):
    - GoogleUtilities/Logger (~> 5.2)
  - FirebaseInstanceID (3.2.0):
    - FirebaseCore (~> 5.1)
    - GoogleUtilities/Environment (~> 5.2)
  - FirebaseMessaging (3.1.0):
    - FirebaseCore (~> 5.0)
    - FirebaseInstanceID (~> 3.0)
    - GoogleUtilities/Reachability (~> 5.2)
    - Protobuf (~> 3.1)
  - GoogleAppMeasurement (5.1.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
    - GoogleUtilities/MethodSwizzler (~> 5.2.0)
    - GoogleUtilities/Network (~> 5.2)
    - "GoogleUtilities/NSData+zlib (~> 5.2)"
    - nanopb (~> 0.3)
  - GoogleUtilities/AppDelegateSwizzler (5.2.2):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (5.2.2)
  - GoogleUtilities/Logger (5.2.2):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (5.2.2):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (5.2.2):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (5.2.2)"
  - GoogleUtilities/Reachability (5.2.2):
    - GoogleUtilities/Logger
  - nanopb (0.3.8):
    - nanopb/decode (= 0.3.8)
    - nanopb/encode (= 0.3.8)
  - nanopb/decode (0.3.8)
  - nanopb/encode (0.3.8)
  - Protobuf (3.6.1)

DEPENDENCIES:
  - Firebase
  - Firebase/Messaging

SPEC REPOS:
  https://github.com/cocoapods/specs.git:
    - Firebase
    - FirebaseAnalytics
    - FirebaseCore
    - FirebaseInstanceID
    - FirebaseMessaging
    - GoogleAppMeasurement
    - GoogleUtilities
    - nanopb
    - Protobuf

SPEC CHECKSUMS:
  Firebase: 8c957f9cb3852b519180fb378801b7eeeba4d288
  FirebaseAnalytics: d4a260c114aec0d765ab5b9c404ac63de1d29381
  FirebaseCore: ee4b35cf8c8e781da296cc7c15125e4608bb954d
  FirebaseInstanceID: 8cd2c6cfe7b9ab65ce7e248f6da7f26f6775b9be
  FirebaseMessaging: f67b3719f520ee200da0e20ce577fe2bce0c01d0
  GoogleAppMeasurement: e785bdb86d3d280abc778156cec323a975f11d1d
  GoogleUtilities: 06b66f9567769a7958db20a92f0128b2843e49d5
  nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
  Protobuf: 1eb9700044745f00181c136ef21b8ff3ad5a0fd5

PODFILE CHECKSUM: 5128fcc348aba846d880d9bb9978b4bf02c0718d

COCOAPODS: 1.5.3

項目構建 whit react-native 並且我使 appId、key 和 profile 應用程序成功連接到 firebase 控制台,但是當我想用 xcode 將它歸檔時,它給出了這個錯誤:

在此處輸入圖片說明

在此處輸入圖片說明

我該如何解決這個錯誤?

我解決了打開“PROJECT-NAME”.xcworkspace

檢查Build Settings中的Build Active Architecture Only設置,並確保它Yes Debug

我正在處理一個舊項目,出於某種原因, DebugRelease No是,Xcode 試圖為模擬器構建尋找 arm64 版本的 Firebase。

libRNFirebase.a添加到您的Linked Framework and Libraries

在 Podfile 中使用

pod 'Firebase/Core'

在此之后轉到終端 pod 更新

就我而言,

當命令pod install

顯示 pod install 黃色警告

  • 使用 $(inherited) 標志,或

  • 從目標中刪除構建設置。


所以當xcode,項目

項目 => 構建設置 => 庫搜索路徑

通過非遞歸添加$(inherited)

然后問題解決了。

確保所有 ios 目標版本與 pod 文件中的相同。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM