You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After run flutter build appbundle --target-platform android-arm,android-arm64,android-x64 -t lib/main.dart
return this: error 'error: lambda expressions are not supported in -source 7 OneSignal.getNotifications().requestPermission(fallback, Continue.with(permissionResult -> { ^ (use -source 8 or higher to enable lambda expressions)'
Steps to reproduce?
1. onesignal_flutter: ^5.0.3
What did you expect to happen?
Build app appbundle
OneSignal Flutter SDK version
5.0.3
Which platform(s) are affected?
iOS
Android
Relevant log output
/Users/fabio/.pub-cache/hosted/pub.dev/onesignal_flutter-5.0.4/android/src/main/java/com/onesignal/flutter/OneSignalNotifications.java:81: error: lambda expressions are not supported in -source 7
OneSignal.getNotifications().requestPermission(fallback, Continue.with(permissionResult -> {
^
(use -source 8 or higher to enable lambda expressions)
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':onesignal_flutter:compileReleaseJavaWithJavac'.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Resolved.
In android/build.gradle change classpath 'com.android.tools.build:gradle:4.1.0' to classpath 'com.android.tools.build:gradle:7.0.1' (upgrade to gradle) and add: classpath 'com.google.gms:google-services:4.3.3', I don't know if it would make a difference, but I added it because I have another project like this and it's working.
What happened?
After run
flutter build appbundle --target-platform android-arm,android-arm64,android-x64 -t lib/main.dart
return this:
error 'error: lambda expressions are not supported in -source 7 OneSignal.getNotifications().requestPermission(fallback, Continue.with(permissionResult -> { ^ (use -source 8 or higher to enable lambda expressions)'
Steps to reproduce?
What did you expect to happen?
Build app appbundle
OneSignal Flutter SDK version
5.0.3
Which platform(s) are affected?
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: