skip to Main Content

I can build my app by flutter run, but I can’t in Xcode for Archive.
Do anyone know how to fix this?

Error

Undefined symbols for architecture x86_64:
  "_pb_encode", referenced from:
      _nano_two_pass_encoding in GoogleAppMeasurement(encoder_common.o)
  "_pb_encode_tag_for_field", referenced from:
      _apmpb_encode_repeated_app_property in GoogleAppMeasurement(apmpb_app_property_encoder.o)
      _apmpb_encode_repeated_audience in GoogleAppMeasurement(apmpb_audience_encoder.o)
      _apmpb_encode_repeated_audience_leaf_filter_result in GoogleAppMeasurement(apmpb_audience_leaf_filter_result_encoder.o)
      _apmpb_encode_repeated_client_property in GoogleAppMeasurement(apmpb_client_property_encoder.o)
      _apmpb_encode_repeated_custom_property in GoogleAppMeasurement(apmpb_custom_property_encoder.o)
      _apmpb_encode_repeated_dynamic_filter_result_timestamp in GoogleAppMeasurement(apmpb_dynamic_filter_result_timestamp_encoder.o)
      _apmpb_encode_repeated_event in GoogleAppMeasurement(apmpb_event_encoder.o)
      ...
  "_pb_read", referenced from:
      _apmpb_decode_repeated_app_property in GoogleAppMeasurement(apmpb_app_property_decoder.o)
      _apmpb_decode_repeated_audience in GoogleAppMeasurement(apmpb_audience_decoder.o)
      _apmpb_decode_repeated_audience_leaf_filter_result in GoogleAppMeasurement(apmpb_audience_leaf_filter_result_decoder.o)
      _apmpb_decode_repeated_client_property in GoogleAppMeasurement(apmpb_client_property_decoder.o)
      _apmpb_decode_repeated_custom_property in GoogleAppMeasurement(apmpb_custom_property_decoder.o)
      _apmpb_decode_repeated_dynamic_filter_result_timestamp in GoogleAppMeasurement(apmpb_dynamic_filter_result_timestamp_decoder.o)
      _apmpb_decode_repeated_event in GoogleAppMeasurement(apmpb_event_decoder.o)
      ...
  "_pb_decode", referenced from:
      _apmpb_decode_app_property in GoogleAppMeasurement(apmpb_app_property_decoder.o)
      _apmpb_decode_audience in GoogleAppMeasurement(apmpb_audience_decoder.o)
      _apmpb_decode_audience_leaf_filter_result in GoogleAppMeasurement(apmpb_audience_leaf_filter_result_decoder.o)
      _apmpb_decode_client_property in GoogleAppMeasurement(apmpb_client_property_decoder.o)
      _apmpb_decode_custom_property in GoogleAppMeasurement(apmpb_custom_property_decoder.o)
      _apmpb_decode_dynamic_filter_result_timestamp in GoogleAppMeasurement(apmpb_dynamic_filter_result_timestamp_decoder.o)
      _apmpb_decode_event in GoogleAppMeasurement(apmpb_event_decoder.o)
      ...
  "_pb_encode_string", referenced from:
      _nano_encode_string in GoogleAppMeasurement(encoder_common.o)
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in firebase_core(FLTFirebaseCorePlugin.o)
  "_FIRFirestoreErrorDomain", referenced from:
      ___63-[FLTTransactionStreamHandler onListenWithArguments:eventSink:]_block_invoke in cloud_firestore(FLTTransactionStreamHandler.o)
  "_OBJC_CLASS_$_FIRQuerySnapshot", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_OBJC_CLASS_$_FIRDocumentSnapshot", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_OBJC_CLASS_$_FIRFirestoreSettings", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreReader.o)
  "_OBJC_CLASS_$_FIRFieldValue", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreReader.o)
  "_OBJC_CLASS_$_FIRDocumentChange", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_OBJC_CLASS_$_FIRFirestore", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestorePlugin.o)
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreReader.o)
  "_OBJC_CLASS_$_GULSwizzler", referenced from:
      objc-class-ref in GoogleAppMeasurement(UIViewController+APMScreenClassName.o)
  "_OBJC_CLASS_$_FIRDocumentReference", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_kFIRFirestoreCacheSizeUnlimited", referenced from:
      -[FLTFirebaseFirestoreReader FIRFirestoreSettings] in cloud_firestore(FLTFirebaseFirestoreReader.o)
  "_GULLogInfo", referenced from:
      ___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement(UIViewController+APMScreenClassName.o)
  "_OBJC_CLASS_$_FIRSnapshotMetadata", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_OBJC_CLASS_$_FIRGeoPoint", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreReader.o)
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_GULIsLoggableLevel", referenced from:
      -[APMMonitor isLoggableLevel:] in GoogleAppMeasurement(APMMonitor.o)
  "_pb_encode_varint", referenced from:
      _nano_encode_repeated_uint64 in GoogleAppMeasurement(encoder_common.o)
  "_OBJC_CLASS_$_FIRLoadBundleTaskProgress", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_GULLogError", referenced from:
      +[APMAnalytics startWithAppID:origin:options:] in GoogleAppMeasurement(APMAnalytics.o)
      -[APMUserDefaults synchronize] in GoogleAppMeasurement(APMUserDefaults.o)
  "_kGULNetworkHTTPStatusCodeNotModified", referenced from:
      -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement.o)
      ___46-[APMMeasurement(URL) requestDeferredDeepLink]_block_invoke in GoogleAppMeasurement(APMMeasurement+URL.o)
  "_kGULNetworkHTTPStatusCodeNotFound", referenced from:
      -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement.o)
  "_pb_ostream_from_buffer", referenced from:
      _nano_two_pass_encoding in GoogleAppMeasurement(encoder_common.o)
  "_kGULNetworkHTTPStatusCodeCannotAcceptTraffic", referenced from:
      -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement(APMETaskManager.o)
  "_GULLogWarning", referenced from:
      +[APMMeasurement sharedInstance] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMUserDefaults objectForKey:] in GoogleAppMeasurement(APMUserDefaults.o)
      -[APMUserDefaults setObject:forKey:] in GoogleAppMeasurement(APMUserDefaults.o)
      -[APMUserDefaults synchronize] in GoogleAppMeasurement(APMUserDefaults.o)
      ___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement(UIViewController+APMScreenClassName.o)
  "_kGULNetworkHTTPStatusNoContent", referenced from:
      -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement(APMETaskManager.o)
      ___46-[APMMeasurement(URL) requestDeferredDeepLink]_block_invoke in GoogleAppMeasurement(APMMeasurement+URL.o)
  "_OBJC_CLASS_$_GULNetwork", referenced from:
      objc-class-ref in GoogleAppMeasurement(APMAnalytics.o)
      objc-class-ref in GoogleAppMeasurement(APMAppDelegateInterceptor.o)
      objc-class-ref in GoogleAppMeasurement(APMMeasurement.o)
      objc-class-ref in GoogleAppMeasurement(APMETaskManager.o)
  "_OBJC_CLASS_$_FIRTimestamp", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreReader.o)
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreWriter.o)
  "_pb_decode_varint", referenced from:
      _nano_decode_repeated_uint64 in GoogleAppMeasurement(decoder_common.o)
  "_kGULNetworkHTTPStatusCodeUnavailable", referenced from:
      -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement(APMETaskManager.o)
  "_OBJC_CLASS_$_FIRFieldPath", referenced from:
      objc-class-ref in cloud_firestore(FLTFirebaseFirestoreReader.o)
  "_OBJC_CLASS_$_GULMutableDictionary", referenced from:
      objc-class-ref in GoogleAppMeasurement(APMEExperiment.o)
      objc-class-ref in GoogleAppMeasurement(APMEExperimentRequestBuilder.o)
      objc-class-ref in GoogleAppMeasurement(APMEManager.o)
      objc-class-ref in GoogleAppMeasurement(APMRemoteConfig.o)
      objc-class-ref in GoogleAppMeasurement(APMESnapshot.o)
  "_OBJC_CLASS_$_GULAppEnvironmentUtil", referenced from:
      objc-class-ref in GoogleAppMeasurement(APMEExperimentRequestBuilder.o)
  "_GULLogBasic", referenced from:
      -[APMASLLogger logMessage:logTag:messageCode:withLogLevel:] in GoogleAppMeasurement(APMASLLogger.o)
  "_kGULNetworkHTTPStatusOK", referenced from:
      -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement.o)
      -[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement(APMETaskManager.o)
      ___46-[APMMeasurement(URL) requestDeferredDeepLink]_block_invoke in GoogleAppMeasurement(APMMeasurement+URL.o)
  "_pb_istream_from_buffer", referenced from:
      _apmpb_decode_app_property in GoogleAppMeasurement(apmpb_app_property_decoder.o)
      _apmpb_decode_audience in GoogleAppMeasurement(apmpb_audience_decoder.o)
      _apmpb_decode_audience_leaf_filter_result in GoogleAppMeasurement(apmpb_audience_leaf_filter_result_decoder.o)
      _apmpb_decode_client_property in GoogleAppMeasurement(apmpb_client_property_decoder.o)
      _apmpb_decode_custom_property in GoogleAppMeasurement(apmpb_custom_property_decoder.o)
      _apmpb_decode_dynamic_filter_result_timestamp in GoogleAppMeasurement(apmpb_dynamic_filter_result_timestamp_decoder.o)
      _apmpb_decode_event in GoogleAppMeasurement(apmpb_event_decoder.o)
      ...
  "_OBJC_CLASS_$_GULAppDelegateSwizzler", referenced from:
      objc-class-ref in GoogleAppMeasurement(APMAnalytics.o)
  "_GULSetLoggerLevel", referenced from:
      -[APMMonitor setDebugModeEnabled:] in GoogleAppMeasurement(APMMonitor.o)
      -[APMMonitor setVerboseLoggingEnabled:] in GoogleAppMeasurement(APMMonitor.o)
  "_pb_encode_submessage", referenced from:
      _apmpb_encode_repeated_app_property in GoogleAppMeasurement(apmpb_app_property_encoder.o)
      _apmpb_encode_repeated_audience in GoogleAppMeasurement(apmpb_audience_encoder.o)
      _apmpb_encode_repeated_audience_leaf_filter_result in GoogleAppMeasurement(apmpb_audience_leaf_filter_result_encoder.o)
      _apmpb_encode_repeated_client_property in GoogleAppMeasurement(apmpb_client_property_encoder.o)
      _apmpb_encode_repeated_custom_property in GoogleAppMeasurement(apmpb_custom_property_encoder.o)
      _apmpb_encode_repeated_dynamic_filter_result_timestamp in GoogleAppMeasurement(apmpb_dynamic_filter_result_timestamp_encoder.o)
      _apmpb_encode_repeated_event in GoogleAppMeasurement(apmpb_event_encoder.o)
      ...
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in AppDelegate.o
      objc-class-ref in cloud_firestore(FLTFirebaseFirestorePlugin.o)
      objc-class-ref in firebase_core(FLTFirebaseCorePlugin.o)
      objc-class-ref in firebase_core(FLTFirebasePlugin.o)
      objc-class-ref in firebase_core(FLTFirebasePluginRegistry.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What I did

and more (sorry, I can’t remember).

2

Answers


  1. Delete Podfile.lock, Go to ios folder and run these commands,

    1. pod deintegrate
    2. pod install
    3. pod update

    Then run the project again and check.

    Login or Signup to reply.
  2. reconfigure the pod files by:

    pod ios
    
    pod cache clean --all
    
    Pod clean
    
    pod deintegrate
    
    sudo gem install cocoapods-deintegrate cocoapods-clean
    
    sudo arch -x86_64 gem install ffi
    
    arch -x86_64 pod repo update
    
    arch -x86_64 pod install
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search