Mackit New

Mackit — Cache cleaner for macOS developers: scans regenerable caches left by Xcode / Node / Flutter and more, risk-labeled, so you can reclaim disk space.

Learn more
Notice We stopped publishing new developer articles in June 2024. Thank you for visiting. Archived posts
前端

flutter launchurl 无法打开链接?

在Flutter使用url_launcher打开外部链接,Android API 30+可能遇到无法打开的问题,今天我们聊聊如何解决这个问题。其实很简单,确保AndroidManifest.xml中添加以下XML



<!--允许程序打开网络套接字-->

<uses-permission android:name="android.permission.INTERNET" />


此外还需要添加

<queries>

<!-- to opens https URLs -->

<intent>

<action android:name="android.intent.action.VIEW" />

<data android:scheme="https" />

</intent>

</queries>


好了,现在大功告成,编译试试吧