I am working on a flutter app on vscode and trying to add device to device notifications functionality to my app.
I followed a video guide- Device to Device Notification | FCM | Firebase and Flutter ,
but I don't get any notifications. So I think it's because of an error I have when I create Application.java file in android/app/main/java/. The error was Application.java is not on the classpath of project app. Only syntax errors are reported. I tried to open vscode android file in android studio to create Application.java file, but somehow vscode said can't find android studio.
screenshots;
Application.javafile location https://i.stack.imgur.com/qeJDs.pngApplication.java https://i.stack.imgur.com/0TCT2.pngPlease have a look at this github issue: not on the classpath of project app, only syntax errors are reported.
The production group developer replied android is not supported by VSCode-Java and explained:
Android uses special Gradle plugins to compute the project classpath, that are not supported in Buildship, the underlying Gradle Integration plugin we delegate Gradle support to.
Currently, there is no ideal solution for that but you can try the Lightweight mode by settingjava.server.launchMode to LightWeight. You will be able to use a subset of features like Go to Definition of the types inside your local source and JDK. But there are also limitations, you won't be able to navigate to the types in Android SDK, and you won't be able to build and debug.