美文网首页
flutter launch安卓打不开外部浏览器

flutter launch安卓打不开外部浏览器

作者: 司徒新新 | 来源:发表于2022-09-28 20:54 被阅读0次

今天测试提过来一个问题,有的用户安卓手机点击打开外部浏览器,没有反应.
一查才知道,原来安卓api30的版本以后,确实是打不开,要加一个权限.
网上查到的一段代码

<queries>
        <!-- If your app opens https URLs -->
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="https" />
        </intent>
        <!-- If your app makes calls -->
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="tel" />
        </intent>
        <!-- If your app emails -->
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:mimeType="*/*" />
        </intent>
    </queries>

然后放的位置就让我发难了,问了之前安卓同事,告诉我放在application标签下面,然后...就运行不起来了,哈哈!最后自己试了几次,发现放在最外面就行....无了个大奈...

具体的位置是android->app->src->main->AndroidManifest.xml这个文件里.
内部是这样放的:

image.png

解决!

相关文章

网友评论

      本文标题:flutter launch安卓打不开外部浏览器

      本文链接:https://www.haomeiwen.com/subject/pazcartx.html