Undefined symbols for architecture x86_64 when building flutter project
Asked Answered
B

2

7

I'm trying to build a flutter project from Xcode Version 12.4 for a iPhone 12 Simulator with iOS 14.4. Everything works fine from command line by running flutter run.

In Xcode I met the following error code.

ld: warning: ignoring file /Users/epsilon/Library/Developer/Xcode/DerivedData/Runner-fukggautraualohaflrpmsjaeyto/Build/Products/Debug-iphonesimulator/Reachability/Reachability.framework/Reachability, building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_Reachability", referenced from:
      objc-class-ref in FLTConnectivityPlugin.o
  "_kReachabilityChangedNotification", referenced from:
      -[FLTConnectivityPlugin onListenWithArguments:eventSink:] in FLTConnectivityPlugin.o
ld: symbol(s) not found for architecture x86_64

I already followed the solution posted here: https://mcmap.net/q/16485/-xcode-building-for-ios-simulator-but-linking-in-an-object-file-built-for-ios-for-architecture-39-arm64-39 and also others from the same post, but without success.

Later edit: enter image description here

Blazonry answered 15/4, 2021 at 17:43 Comment(5)
I had this issue and nothing on SO helped me. The thing that solved it for me was to back up the code, create a new flutter project, and then slowly put code back until it breaks, and hopefully it won't break. This isn't quite a solution to this so I'll just leave this as a comment.Obvolute
this is not an error. this is a warning. you can ignore itKeramic
I updated the post with a screenshot.Blazonry
any updates? I'm stuck with this problem as wellCagle
Still facing this issue. For me works to create a build for a real device and to publish an app as well, but the build for an emulator is not working.Blazonry
K
0

create new project with flutter create and migrate the code into the new project.

Kamilahkamillah answered 2/8, 2021 at 6:56 Comment(0)
R
0

I faced the same problem. After removing the connectivity package from the flutter project the simulator works again as expected.

Ramification answered 20/5, 2023 at 8:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.