Trying to integrate Firebase Cloud messaging in my flutter app and I only receive the Exit Code 1 error when I try running my app specifically using the android emulator. If I take out Cloud messaging, it works just fine. iOS simulator works just fine with or without cloud messaging.
This stack answer didn't work: Firebase Cloud Functions emulator throws "exited with code: 1" error
I've tried different versions and ranges of the Firebase Messaging Plugin from here: https://pub.dev/packages/firebase_messaging/versions.
I've tried so many different things from adding
I followed steps from different sources (including the official documentation) in which they all basically said the same thing:
add:
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
to my Android manifest
add:
apply plugin: 'com.google.gms.google-services'
to the bottom of the app level build gradle
and my project level build gradle dependencies look like this:
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
}
My exact console looks like this:
Launching lib/extras/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Finished with error: Gradle task assembleDebug failed with exit code 1
I really like the analytics and ease of sending messages Firebase has to offer so ideally I would want to fix this issue. If that can't happen, are there any alternatives to push custom notifications that's similar to FCM? Can Google Play and/or iOS StoreKit do this? I've never submitted an app to the app store yet and only recently bought my developer account from Apple.