我在flutter中使用url_launcher程序包,它给了我这个错误。.如果我删除了该程序包,那么一切都很好,如何解决此问题?
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:10:8: Error: Error when reading '/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-1.0.8/lib/url_launcher_platform_interface.dart': The system cannot find the path specified.
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:92:29: Error: Getter not found: 'UrlLauncherPlatform'.
final bool result = await UrlLauncherPlatform.instance.launch(
^^^^^^^^^^^^^^^^^^^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:116:16: Error: Getter not found: 'UrlLauncherPlatform'.
return await UrlLauncherPlatform.instance.canLaunch(urlString);
^^^^^^^^^^^^^^^^^^^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:131:16: Error: Getter not found: 'UrlLauncherPlatform'.
return await UrlLauncherPlatform.instance.closeWebView();
^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'F:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'F:\Program Files\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8m 42s
Exception: Gradle task assembleDebug failed with exit code 1