flutter包url_launcher报错
问题描述:使用url_launcher打开浏览器时报错could not launch
环境配置:
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
url_launcher: ^6.0.4
avd配置
API | Target | CPU/ABI |
---|---|---|
30 | Android 11.0 | x86 |
由Stackflow Flutter url_launcher Unhandled Exception: Could not launch youtube url (Caused by canLaunch) 知是Android11版本之后的权限配置问题,暂时还没看懂怎么配置。
临时解决方法:新建Android10.0的模拟器。
之后有配置权限的方案再记录。