My Application.kt file is like this. Could't find a way for changing PluginRegistrantCallback and FlutterFirebaseMessagingService
import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
class Application : FlutterApplication(), PluginRegistrantCallback {
override fun onCreate() {
super.onCreate()
FlutterFirebaseMessagingService.setPluginRegistrant(this)
}
override fun registerWith(registry: PluginRegistry?) {
io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(
registry?.registrarFor(
"io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
}
}
ext.kotlin_version = '1.5.10' When I build the project I get this type error
e: /-/Application.kt: (6, 27): Unresolved reference: firebasemessaging
e: /-/Application.kt: (12, 9): Unresolved reference: FlutterFirebaseMessagingService
e: /-/Application.kt: (16, 28): Unresolved reference: firebasemessaging
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1