【发布时间】: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