无法在Flutter中创建构建存档

时间:2018-04-15 05:27:57

标签: xcode firebase flutter

在Xcode中创建构建存档时,请获取这些错误消息。但我可以在我的iOS设备上运行该应用程序。

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_FlutterAppDelegate", referenced from:
      _OBJC_CLASS_$_AppDelegate in AppDelegate.o
  "_FlutterMethodNotImplemented", referenced from:
      -[FLTFirebaseAdMobPlugin handleMethodCall:result:] in libfirebase_admob.a(FirebaseAdMobPlugin.o)
      -[LocationPlugin handleMethodCall:result:] in liblocation.a(LocationPlugin.o)
      ___52+[FLTSharedPreferencesPlugin registerWithRegistrar:]_block_invoke in libshared_preferences.a(SharedPreferencesPlugin.o)
  "_OBJC_CLASS_$_FlutterError", referenced from:
      objc-class-ref in libfirebase_admob.a(FirebaseAdMobPlugin.o)
  "_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
      objc-class-ref in libfirebase_admob.a(FirebaseAdMobPlugin.o)
      objc-class-ref in liblocation.a(LocationPlugin.o)
      objc-class-ref in libshared_preferences.a(SharedPreferencesPlugin.o)
  "_OBJC_CLASS_$_FlutterEventChannel", referenced from:
      objc-class-ref in liblocation.a(LocationPlugin.o)
  "_OBJC_METACLASS_$_FlutterAppDelegate", referenced from:
      _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:1)

在Flutter.framework中似乎缺少对armv7的支持。这就是为什么您可以在arm64设备上运行但无法为通用设备存档的原因。请按照以下说明生成支持armv7的Flutter.framework。 Armv7 build instructions。看看这issue可能会有帮助。