未经手的例外:platformException(activity_not_found,没有发现可以处理意图{09829132444}的活动,null,null,null)

发布于 2025-02-06 19:41:32 字数 1053 浏览 1 评论 0原文

我有一个用于邮寄用户的按钮,但是当我单击按钮时,请显示平台异常

launchUrl(Uri(path: "mailto:${baseSetting.baseSetting?.mail ?? ''}"))

E/flutter ( 1164): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(ACTIVITY_NOT_FOUND, No Activity found to handle intent { mailto%[email protected] }, null, null)
E/flutter ( 1164): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 1164): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
E/flutter ( 1164): <asynchronous suspension>
E/flutter ( 1164): #2      launchUrlString (package:url_launcher/src/url_launcher_string.dart:39:10)
E/flutter ( 1164): <asynchronous suspension>
E/flutter ( 1164): #3      launchUrl (package:url_launcher/src/url_launcher_uri.dart:55:10)
E/flutter ( 1164): <asynchronous suspension>

,请帮助如何解决此问题

I have a button for mailing user, but when i click button it showing platform exception

launchUrl(Uri(path: "mailto:${baseSetting.baseSetting?.mail ?? ''}"))

E/flutter ( 1164): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(ACTIVITY_NOT_FOUND, No Activity found to handle intent { mailto%[email protected] }, null, null)
E/flutter ( 1164): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 1164): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
E/flutter ( 1164): <asynchronous suspension>
E/flutter ( 1164): #2      launchUrlString (package:url_launcher/src/url_launcher_string.dart:39:10)
E/flutter ( 1164): <asynchronous suspension>
E/flutter ( 1164): #3      launchUrl (package:url_launcher/src/url_launcher_uri.dart:55:10)
E/flutter ( 1164): <asynchronous suspension>

please help how to solve this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

自由如风 2025-02-13 19:41:32

您可以在这篇文章中尝试答案: Android:没有发现可以处理意图错误的活动?它将如何解决

但是在我的应用中遇到此错误的应用中,这是由于我使用的没有安装Gmail的模拟器。在使用Gmail的情况下,一切都很好(显然我的应用程序正在打开Gmail而不是联系人)。因此,请确保您安装了

You may try the answer in this post : Android: No Activity found to handle Intent error? How it will resolve

but in my app where i got this error, it was due to the emulator i used not having gmail installed on it. upon getting one with gmail everything worked fine(obviously my app is opening gmail and not contacts). so make sure you have yours installed

蓝咒 2025-02-13 19:41:32

您必须在上面的androidmanifest.xml文件中添加以下查询

<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="https" />
    </intent>
    <intent>
        <action android:name="android.intent.action.DIAL" />
        <data android:scheme="tel" />
    </intent>
    <intent>
        <action android:name="android.intent.action.SEND" />
        <data android:mimeType="*/*" />
    </intent>
</queries>

.
.
.
=>

You have to add the following queries in AndroidManifest.xml file above

<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="https" />
    </intent>
    <intent>
        <action android:name="android.intent.action.DIAL" />
        <data android:scheme="tel" />
    </intent>
    <intent>
        <action android:name="android.intent.action.SEND" />
        <data android:mimeType="*/*" />
    </intent>
</queries>

.
.
.
=>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文