按下录音后报错了
来源:15-11 Flutter AI智能语音搜索功能实现【锦上添花】
TiAmo_oooooo
2019-08-06
这是什么问题
写回答
2回答
-
CrazyCodeBoy
2019-08-12
原因在于你的iOS代码中没有注册这个插件导致的:
https://git.imooc.com/coding-321/flutter_trip/src/master/ios/Runner/AppDelegate.m#L10
#include "AppDelegate.h" #include "GeneratedPluginRegistrant.h" #import "AsrPlugin.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GeneratedPluginRegistrant registerWithRegistry:self]; //注册自有的插件 [AsrPlugin registerWithRegistrar:[self registrarForPlugin:@"AsrPlugain"]]; // Override point for customization after application launch. return [super application:application didFinishLaunchingWithOptions:launchOptions]; } @end
10 -
CrazyCodeBoy
2019-08-06
native插件代码没有正确实现start方法,建议对照这块的课程源码检查下:https://git.imooc.com/coding-321/flutter_trip/src/master/ios/plugin/ASRPlugin/AsrPlugin.m#L22
052019-08-12
相似问题
集成语音报错
回答 2
安卓集成flutter module报错
回答 3