在发布模式下构建 apk 时 url_launcher 中的错误

时间:2021-04-09 20:32:52

标签: flutter flutter-layout flutter-dependencies flutter-web flutter-test

我在我的项目中使用 url_launcher 包。当我在调试模式下调试或构建 apk 时,我过去没有错误。但是当我使用在发布模式下构建 apk 时,出现以下错误:-

E/颤振(6159): E/flutter (6159): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] 未处理的异常:MissingPluginException(在通道 plugins.flutter.io/url_launcher 上找不到方法启动的实现) E/flutter(6159):#0 MethodChannel._invokeMethod(包:flutter/src/services/platform_channel.dart:156) E/颤振(6159): E/flutter(6159):#1 MethodChannelUrlLauncher.launch。 (包:url_launcher_platform_interface/method_channel_url_launcher.dart) 包:url_launcher_platform_interface/method_channel_url_launcher.dart:1 E/颤振(6159):

我的 pubspec 文件是

name: test
description: A new Flutter project.

publish_to: 'none'
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.0
  url_launcher: ^6.0.3
  flutter_webview_plugin: ^0.3.11
  carousel_slider: ^2.0.0
  contactus: ^1.1.7
  fluttertoast: ^7.0.2
  image_picker: ^0.6.7
  flutter_datetime_picker: ^1.4.0
  firebase_core: ^0.4.5
  firebase_auth: ^0.16.1
  firebase_database: ^3.1.6
  pin_code_text_field: ^1.3.6
  simple_animations: ^1.3.3
  flip_card: ^0.4.4
  carousel_pro: ^1.0.0
  maps_launcher: ^2.0.0
  mailto: ^1.1.0
  webview_flutter: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: "^0.7.3"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon.png"

flutter:
  uses-material-design: true

0 个答案:

没有答案