我使用Flutter Speech_recognition软件包遇到了构建错误。立即尝试为iOS构建。尚未测试Android。
我遵循了安装指南。修改.yaml文件后,该程序包似乎已加载。我在MacBook Pro上使用Visual Studio IDE。
Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done. 9.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET speech_recognition OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/abcdefg/Development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SpeechRecognitionPlugin.m:2:9: fatal error: 'speech_recognition/speech_recognition-Swift.h' file not found
#import <speech_recognition/speech_recognition-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
从我的dev目录中。我可以找到Speech_recognition目录,但是.h文件不在任何地方。
abcdefg-MacBook-Pro:Development abcdefg$ !find
find . -name speech_recognition
./learning_fluter/ios/Pods/Target Support Files/speech_recognition
./learning_fluter/ios/Pods/Headers/Public/speech_recognition
./learning_fluter/ios/Pods/Headers/Private/speech_recognition
./learning_fluter/ios/.symlinks/plugins/speech_recognition
./learning_fluter/build/ios/Debug-iphonesimulator/speech_recognition
abcdefg-MacBook-Pro:Development abcdefg$ find . -name speech_recognition-Swift.h
abcdefg-MacBook-Pro:Development abcdefg$
任何帮助将不胜感激!
答案 0 :(得分:0)
最后在podfile中添加以下内容:
目标“跑步者”要做
use_frameworks!