-
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 ] Error in run gradle after install firebase_messaging #77
Comments
This solution worked for me:
|
I tried that @ericklhe , didn´t work for me, show the same error from before updating the Graddle |
@pablomdd, could you please post your configuration files (app/build.gradle, etc..)? Also, please use the latest libraries from pub. You could use Flutter Enhancement suite on Android Studio. This plugin will help you out on this manner (it'll check if you need to upgrade your libraries). |
Pretty sure I have the same error. Platform I'm on is Windows 10 and developing in VSCode.
AndroidManifest.xml is unchanged. And google-settings.json is located in android/app/google-settings.json. All I did was create a new flutter project, add firebase_messaging: ^5.1.5, then change the above files and gradle errors as per OP. If I change the dependencies to
Original error message:
Should be pretty straight forward to reproduce. |
I tried to reproduce these issues using different scenarios, and I found out that the issue here is with the kotlin version (project_folder/build.gradle). Please change ext.kotlin_version from this:
to this:
You also need to upgrade the dependencies on project_folder/build.gradle:
and gradle-wrapper.properties:
Remember to add |
@ericklhe That has changed the error message. I've managed to identify the issue for this error message, it's something to do with the google-services dependency as it all works fine with the updated versions until I add The error I get now is:
At this point I haven't even added firebase_messaging as an implementation or to my pubspec.yaml. |
Ok so I managed to get this to run after the upgrade to The way I could get it to work is changing quite a few settings that is not in the main installation documentation as follows: android/build.gradle
android/app/build.gradle
android/gradle/wrapper/gradle-wrapper-properties
Haven't tested if the notifications actually work but at least the project builds. |
The project builds perfectly and notifications are working!! Thank you very much! |
Hi @masami6871 |
I get the same here. I found that on mac and linux it works, but not on windows.
androis/build.gradle
app/build.gradle
|
Hello
i intalled firebase_messaging: ^5.1.4
after installation , gradle dose not work.
i set this settings :
in [project]/android/build.gradle :
`buildscript {
repositories {
google()
jcenter()
}
}`
in [project]/android/app/build.gradle :
`dependencies {
implementation 'com.google.firebase:firebase-core:17.2.0'
}
apply plugin: 'com.google.gms.google-services'`
and in androidmonifest :
<intent-filter> <action android:name="FLUTTER_NOTIFICATION_CLICK" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>
but when i play codes i see this problem :
`Resolving dependencies...
ProcessException: Process "E:\projects\firstFlutterApp\whatsapp\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
Where:
Build file 'E:\projects\firstFlutterApp\whatsapp\android\app\build.gradle' line: 24
What went wrong:
A problem occurred evaluating project ':app'.
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 3s
Command: E:\projects\firstFlutterApp\whatsapp\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.`
line 24 is : apply plugin: 'com.android.application'
what should i do ?
The text was updated successfully, but these errors were encountered: