我正在尝试在ios模拟器上运行我的flutter应用程序,该模拟器包含一些插件,例如连接性,flutter_webview,fluttertoast等。 当我尝试运行这些插件时,所有这些插件都出现以下错误。
Undefined symbols for architecture i386:
"_FlutterMethodNotImplemented", referenced from:
-[FluttertoastPlugin handleMethodCall:result:] in FluttertoastPlugin.o
"_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in FluttertoastPlugin.o
事情在android上运行顺利。
我尝试过
flutter clean
pod install
该错误仍然存在。 任何人都面临类似的错误吗?如果有人对此有解决方案,请帮助我。谢谢
flutter doctor -v输出
[✓] Flutter (Channel beta, v0.11.9, on Mac OS X 10.14.1 18B75, locale en-IN)
• Flutter version 0.11.9 at /Users/vipin/Downloads/soft/flutter
• Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
• Engine revision 5c8147450d
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/vipin/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/vipin/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 30.0.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] Connected device (1 available)
• iPhone XR • DAE7804F-C35A-4847-94AF-BC094BE584DC • ios • iOS 12.1 (simulator)
• No issues found!
答案 0 :(得分:9)
如果您使用的是应用程序风格并且遇到错误,请查看here
答案 1 :(得分:0)
此错误与Undefined symbols for architecture i386
有关
这对我有用-对于报告警告的目标,将“有效架构”设置更改为:
$(VALID_ARCHS)
x86_64
P.S如果这没有帮助,请转到“构建设置”并搜索“ No Common Blocks”,并将其设置为“ No”。构建并运行。
答案 2 :(得分:0)
我通过切换到主频道解决了问题
在终端中键入以下命令:
1-当前频道:
flutter channel
2-更改频道:
flutter channel CHANNEL_NAME
例如将频道更改为主频道:
flutter channel master
3-升级颤动:
flutter upgrade