如何修复此错误我尝试(Flutter Run)在显示此错误的 flutter 中调试我的代码和测试应用程序... 在此之前我有 Gradle Build 错误我在显示之后修复它
<块引用>支持的最低 Gradle 版本是 5.6.4。当前版本是 5.6.2。如果使用 gradle 包装器,请尝试编辑 distributionUrl
我在显示此错误后尝试更新 gradle 版本):
**> event sent after app closed: {id: 0, progressId: null, message: Running "flutter pub get" in play_big_win...}
event sent after app closed: {id: 0, progressId: null, finished: true}
Launching lib\main.dart on sdk gphone x86 in debug mode...
lib\main.dart
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:14: error: package io.flutter.embedding.engine.plugins does not exist
import io.flutter.embedding.engine.plugins.FlutterPlugin;
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:15: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodCall;
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:16: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodChannel;
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:17: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.PluginRegistry;
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:29: error: cannot find symbol
public class FlutterFirebaseCorePlugin implements FlutterPlugin, MethodChannel.MethodCallHandler {
^
symbol: class FlutterPlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:29: error: package MethodChannel does not exist
public class FlutterFirebaseCorePlugin implements FlutterPlugin, MethodChannel.MethodCallHandler {
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:47: error: cannot find symbol
private MethodChannel channel;
^
symbol: class MethodChannel
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:71: error: package PluginRegistry does not exist
public static void registerWith(PluginRegistry.Registrar registrar) {
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:77: error: cannot find symbol
public void onAttachedToEngine(FlutterPluginBinding binding) {
^
symbol: class FlutterPluginBinding
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:84: error: cannot find symbol
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
^
symbol: class FlutterPluginBinding
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:223: error: cannot find symbol
public void onMethodCall(MethodCall call, @NonNull final MethodChannel.Result result) {
^
symbol: class MethodCall
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:223: error: package MethodChannel does not exist
public void onMethodCall(MethodCall call, @NonNull final MethodChannel.Result result) {
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:72: error: cannot find symbol
final MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL_NAME);
^
symbol: class MethodChannel
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:72: error: cannot find symbol
final MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL_NAME);
^
symbol: class MethodChannel
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:76: error: method does not override or implement a method from a supertype
@Override
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:79: error: cannot find symbol
channel = new MethodChannel(binding.getBinaryMessenger(), CHANNEL_NAME);
^
symbol: class MethodChannel
location: class FlutterFirebaseCorePlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:83: error: method does not override or implement a method from a supertype
@Override
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:222: error: method does not override or implement a method from a supertype
@Override
^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.3\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java:226: error: illegal start of type
switch (call.method) {
^
19 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 6m 45s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)**