-
Notifications
You must be signed in to change notification settings - Fork 4k
Firebase-Cloud-Messaging #2688
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
Comments
Hi @tronantonio
Can you please provide your |
Hi, I really have these lines in my android manifest xml file. my Main.dart:
Run -verbose
|
Hi @tronantonio Please create a new project with kotlin support and add this to your
|
@TahaTesser |
@TahaTesser yes I am aware the info is widely available in bug reports, but that's exactly what i was criticizing |
Hey @tronantonio. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @tronantonio if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
I add firebase messaging version 6.0.16 from the pub.dev website and follow the instructions. When I add the java class Application.java I get various errors when import io.flutter.pluggins.firebasemessaging which is not found or resolved.
To Reproduce
1 Create new application using android studio with flutter and dart.
2 Create an application in firebase console and configure your app in android studio following the instrucctions.
3 Add Firebase Messaging 6.0.16 in pubspec.yaml file from https://pub.dev/packages/firebase_messaging#android-integration
4 Follow the instructions to the point 4 and continue with "Optionally handle background messages" apart next.
5 This apart have 6 points. In point 2, when I add java class named Application.java I found the errors described (see picture). At this point 2, android studio dont resolve "import io.flutter.plugins.firebasemessaging....". If I complete the steps the errors persists and It's impposible continue with the app.
Expected behavior
I expected to correctly configure the plugin but I cant.
Additional context
In Application.java in line "import io.flutter.plugins.firebasemessaging...." Android Studio show the error: "cannot resolve simbol firebasemessaging".
In Application.java, in line " FlutterFirebaseMessagingService.setPluginRegistrant(this);" Android Studio show the error: "cannot resolve simbol FlutterFirebaseMessagingService"
And in line "GeneratedPluginRegistrant.registerWith(registry);" (Application.java) Android Studio show another error.
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.2, on Microsoft Windows [Versión 10.0.18363.836], locale es-ES)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.45.1)
[√] Connected device (1 available)
• No issues found!
Picture show errors when add Application.java

build.gradle android level
buildscript {
repositories {
google()
jcenter()
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build.gradle on app level
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
dependencies {
// add the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-messaging:20.2.0'
// add SDKs for any other desired Firebase products
// https://firebase.google.com/docs/android/setup#available-libraries
}
android {
compileSdkVersion 28
}
flutter {
source '../..'
}
Others
I change data in AndroidManifest.xml acording with instruccions:
....
Is gradle problem? Or plugin problem? I need help with this. Thanks
The text was updated successfully, but these errors were encountered: