-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firebase_messaging] Unresolved reference: firebasemessaging #1558
Comments
in my case there is same issue i solve this by public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
} Hope this one can help you |
It is what I have in this class already, unfortunately it doesn't work. |
Hi @VictorUvarov Hi @DjivaCanessane |
@Mohitjadav solutions is what flutter automatically creates in the |
Does the service work in Kotlin or only Java? |
@VictorUvarov In my project on Kotlin not works |
@kaparray Are you solved this problem and written code in Kotlin. I need that in Kotlin. i have one doubt why we need to create new kotlin file Application.kt because i already have some native code in mainActivity file with kotlin. |
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v' please. |
Please add the correct implementation guide for the latest version of Flutter which enables MainActivity.kt and kotlin file |
Describe the bug
In the README for background messages. The example for
Application.java
importsimport io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
If you create a new project there is noFlutterFirebaseMessagingService
class in the Java codeandroid.main.java.io.flutter.plugins
folder. Are we supposed to create this class ourselves?To Reproduce
Steps to reproduce the behavior:
Expected behavior
An implementation example of how to handle
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
Additional context
Maybe I am wrong and somehow the Flutter
firebase_messaging
injects the code?The text was updated successfully, but these errors were encountered: