0

I add this dependency in pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter

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

on the Run time I get this file.

"GeneratedPluginRegistrant.java" file.

     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());
      }
   }

and I got this error on run time.

enter image description here

2
  • try to align the dependency in your pubspec.yaml with flutter: line. i.e having the same space with flutter: line. Commented Nov 30, 2021 at 14:04
  • @ישואוהבאותך thanks for suggestion, but I already align it. and also adjust with same space in line. Commented Nov 30, 2021 at 14:13

2 Answers 2

1

Follows these steps:

-> Reinstall Flutter and Dart Plugin

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

-> Update dependencies version

Sign up to request clarification or add additional context in comments.

Comments

0
  1. flutter clean
  2. flutter pub cache repair
  3. change compileSdkVersion and targetSdkVersion at least to 34 if below

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.