0

I want to add Firebase Cross messaging plugin to my Flutter app. Now the problem is It's giving me the error which is below here. Your assistance will be highly valued abd appreciated. I have tried updating my target and compilled SDKs to 33 but nothing is still working.

Launching lib/main.dart on Android SDK built for x86 in debug mode...
main.dart:1
/home/comfortchambeshi/.pub-cache/hosted/pub.dev/firebase_messaging-14.6.3/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebasePermissionManager.java:63: error: cannot find symbol
    permissions.add(Manifest.permission.POST_NOTIFICATIONS);
                                       ^
  symbol:   variable POST_NOTIFICATIONS
  location: class permission
/home/comfortchambeshi/.pub-cache/hosted/pub.dev/firebase_messaging-14.6.3/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingBackgroundExecutor.java:235: error: method getParcelableExtra in class Intent cannot be applied to given types;
          intent.getParcelableExtra(
                ^
  required: String
  found: String,Class<RemoteMessage>
  reason: cannot infer type-variable(s) T
    (actual and formal argument lists differ in length)
  where T is a type-variable:
    T extends Parcelable declared in method <T>getParcelableExtra(String)
/home/comfortchambeshi/.pub-cache/hosted/pub.dev/firebase_messaging-14.6.3/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingPlugin.java:134: error: method getParcelableExtra in class Intent cannot be applied to given types;
            intent.getParcelableExtra(
                  ^
  required: String
  found: String,Class<RemoteMessage>
reason: cannot infer type-variable(s) T
    (actual and formal argument lists differ in length)
  where T is a type-variable:
    T extends Parcelable declared in method <T>getParcelableExtra(String)
/home/comfortchambeshi/.pub-cache/hosted/pub.dev/firebase_messaging-14.6.3/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingPlugin.java:405: error: cannot find symbol
            .checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS)
                                                    ^
  symbol:   variable POST_NOTIFICATIONS
  location: class permission
  • Can you show did you updated your compiled and target SDK? Does these links help ? https://github.com/firebase/flutterfire/issues/9771 https://stackoverflow.com/questions/72388741/android-manifest-post-notifications-missing-import – Mearaj Jun 17 '23 at 02:12

0 Answers0