【问题标题】:Flutter Dependency Issue in "GeneratedPluginRegistrant.java" file“GeneratedPluginRegistrant.java”文件中的颤振依赖问题
【发布时间】:2022-01-07 05:40:45
【问题描述】:

我在 pubspec.yaml 文件中添加了这个依赖项。

dependencies:
  flutter:
    sdk: flutter

     fluttertoast: ^8.0.8
     flutter_local_notifications: ^6.0.0
     vibration: ^1.7.3

在运行时我得到了这个文件。

“GeneratedPluginRegistrant.java”文件。

     public final class GeneratedPluginRegistrant {
        public static void registerWith(@NonNull FlutterEngine flutterEngine) {
         flutterEngine.getPlugins()
           .add(newcom.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin());
         flutterEngine.getPlugins()
               .add(new io.github.ponnamkarthik.toast.fluttertoast.FlutterToastPlugin());
         flutterEngine.getPlugins()
              .add(new com.benjaminabel.vibration.VibrationPlugin());
      }
   }

我在运行时遇到了这个错误。

【问题讨论】:

  • 尝试将pubspec.yaml 中的依赖项与flutter: 行对齐。即与flutter: 行具有相同的空间。
  • @ישואוהבאותך 感谢您的建议,但我已经对齐了。并用相同的空间进行调整。

标签: java android flutter dart dependencies


【解决方案1】:

在这里,花了这么多小时寻找解决方案,然后我得到了解决方案。

按照步骤,

-> Reinstall Flutter and Dart Plugin

-> make same(duplicate) project with Different Name (coz below step not working on same project)

-> Update dependencies version 

☻♥ 完成。保留代码。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-01
    • 2021-09-19
    • 1970-01-01
    • 2020-10-28
    相关资源
    最近更新 更多