8wDlpd.png
8wDFp9.png
8wDEOx.png
8wDMfH.png
8wDKte.png

架构 arm64 的未定义符号:'_OBJC_CLASS_$_FlutterError'

E.Bibler 1月前

17 0

我想在 Flutter 应用中实现图像通知。我使用此文档设置了所有内容,当我运行真实设备时,图像通知有效。但是,当我尝试存档构建时,我

我想在 Flutter 应用中实现图像通知。我使用 此文档 ,当我运行真实设备时,图像通知有效。

但是,当我尝试存档构建时,我收到此错误。只有删除 MyImageNotification 目标后,我才能进行存档。

enter image description here

这是我完成 imagg 通知设置后的文件夹结构

我从错误日志的底部收到以下消息

ld: warning: Could not find or use auto-linked framework 'Flutter'
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FlutterError", referenced from:
      objc-class-ref in firebase_core(FLTFirebasePlugin.o)
      objc-class-ref in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o)
  "_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
      objc-class-ref in firebase_core(FLTFirebaseCorePlugin.o)
      objc-class-ref in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o)
      objc-class-ref in firebase_messaging(FLTFirebaseMessagingPlugin.o)
  "_FlutterMethodNotImplemented", referenced from:
      -[FLTFirebaseCorePlugin handleMethodCall:result:] in firebase_core(FLTFirebaseCorePlugin.o)
      -[FLTFirebaseDynamicLinksPlugin handleMethodCall:result:] in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o)
      -[FLTFirebaseMessagingPlugin handleMethodCall:result:] in firebase_messaging(FLTFirebaseMessagingPlugin.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我的 PodFile 看起来像这样


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

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
 matches = line.match(/FLUTTER_ROOT\=(.*)/)
 return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
installer.pods_project.targets.each do |target|
 flutter_additional_ios_build_settings(target)
end
end

target 'MyImageNotification' do
use_frameworks!

pod 'Firebase/Messaging'
end


帖子版权声明 1、本帖标题:架构 arm64 的未定义符号:'_OBJC_CLASS_$_FlutterError'
    本站网址:http://xjnalaquan.com/
2、本网站的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
3、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
4、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
5、站长邮箱:yeweds@126.com 除非注明,本帖由E.Bibler在本站《xcode》版块原创发布, 转载请注明出处!
最新回复 (0)
返回
作者最近主题: