首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >颤振:错误:包io.flutter.embedding.engine.plugins不存在

颤振:错误:包io.flutter.embedding.engine.plugins不存在
EN

Stack Overflow用户
提问于 2021-01-26 13:32:37
回答 1查看 2.7K关注 0票数 6

如何修正这个错误我试图(运行)调试我的代码和测试应用程序在颤振显示这个错误.在此之前,我有Gradle构建错误,我在显示之后修复了它

支持的最低级别版本为5.6.4。当前版本为5.6.2。如果使用gradle包装器,请尝试编辑distributionUrl

我试图在显示此错误之后更新gradle版本):

代码语言:javascript
运行
复制
**> 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)**
EN

回答 1

Stack Overflow用户

发布于 2021-11-12 14:42:33

您遇到的错误意味着您要么需要迁移到AndroidX,要么降级到与AndroidX之前版本兼容的插件版本。

检查与迁移到AndroidX有关的下列问题:

看看这个:

突破变化。从废弃的原始安卓支持库迁移到AndroidX。这不应导致任何功能更改,但如果使用的是原始支持库,则需要任何使用此插件的Android应用程序到also migrate

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65902344

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档