我在科多瓦(V11)项目中使用cordova插件-语音识别;它在android10或以下设备下工作得很好,但在android11上不起作用。
当我的应用程序使用语音识别时,android11设备说“系统上没有语音识别服务”。
我在这个网站上发现了非常相似的问题和答案,
问题:Android11Beta系统上没有语音识别服务。
答案:在AndroidManifest.xml中添加下一个代码
<queries>
<intent>
<action
android:name="android.speech.RecognitionService"/>
</intent>
</queries>我的问题是如何将上述代码添加到我的cordova项目中。
我在其他网站上找到了一些建议,“使用edit将(上面的)代码写进cordova config.xml”,但我仍然不明白怎么写。有人能给这位科多瓦新手提个建议吗?
发布于 2022-04-04 03:53:33
我也有同样的问题,去config.xml看看:
<config-file target="AndroidManifest.xml" parent="/manifest">
<queries>
<intent>
<action
android:name="android.speech.RecognitionService"/>
</intent>
</queries>
</config-file>添加上面的代码,享受吧!
https://stackoverflow.com/questions/71505916
复制相似问题