Skip to content

Error bigPictureStyle.bigLargeIcon(null) v17.1.2 #2329

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

Closed
JaTocora opened this issue May 25, 2024 · 26 comments · Fixed by #2355
Closed

Error bigPictureStyle.bigLargeIcon(null) v17.1.2 #2329

JaTocora opened this issue May 25, 2024 · 26 comments · Fixed by #2355

Comments

@JaTocora
Copy link

flutter_local_notifications-17.1.2/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java:1033: error: reference to bigLargeIcon is ambiguous
bigPictureStyle.bigLargeIcon(null);
^
both method bigLargeIcon(Bitmap) in BigPictureStyle and method bigLargeIcon(Icon) in BigPictureStyle match

@godzyken
Copy link

godzyken commented Jun 5, 2024

pareil quelqu'un à t'il resolu ce probleme?

@MaikuB
Copy link
Owner

MaikuB commented Jun 12, 2024

Whilst I understand why you're seeing this, this isn't something I've seen that can reproduced and hasn't happened via the pipelines. I suspect it might be an issue specific with the Android SDK you're using

@ducdx-0072
Copy link

I faced this problem too, and I don't understand the reason ;(

@MaikuB
Copy link
Owner

MaikuB commented Jun 28, 2024

Which versions of the Android SDK do you have installed? I only have the ones for Android 13 and 14 installed and don't have this issue

@godzyken
Copy link

godzyken commented Jun 28, 2024 via email

@MaikuB
Copy link
Owner

MaikuB commented Jun 28, 2024

@godzyken could you write in English please?

@mark8044
Copy link

mark8044 commented Jun 28, 2024

@godzyken could you write in English please?

I just had this issue for the first time today.

I was on master branch Flutter 3.23.0-13.0.pre.300 and 17.1.2 perfectly fine, then upgraded to master branch Flutter 3.23.0-13.0.pre.370 and I got the error.

I moved to 17.2.0 and it still occurrs

I downgraded to master branch Flutter 3.23.0-13.0.pre.300 and its gone.

This only occurs on Android. I did not change anything with android SDK (Platform android-34, build-tools 34.0.0). iOS remains ok.

I think something has changed in latest flutter framework, so I believe this needs attention

EDIT: Bisecting the issue:
Commit f23dbc50f05c56ef5be871203bb4f167f07df845 is BAD (6/26/24)
Commit 69ff23b3debe9ce1e447439557c09c0bf84bb24b is OK (6/26/24)
Commit 2d02215080e8cc36b4f5c8287f6935525fa3c643 is OK (6/26/24)

Therefor I believe the issue is caused with flutter PR flutter/flutter#150952
That PR is a rabbit hole of rolled changes

@gnprice
Copy link

gnprice commented Jun 28, 2024

Very helpful, thanks @mark8044 for bisecting!

That commit changes bin/internal/engine.version from flutter/engine@d1506c1 to flutter/engine@ddd4814.

Looking at the Git log between those, it's just three commits:
flutter/engine@3f40c6875 Fix AccessibilityFeatures.disableAnimations flag on Android 12+ (flutter/engine#53428)
flutter/engine@7ccef46a8 Roll Skia from dee7339d0b53 to c73e514838b4 (7 revisions) (flutter/engine#53613)
flutter/engine@ddd4814b9 Re-re-re-land "Upgrade all[most] androidx dependencies to latest" (flutter/engine#53592)

Seems like the last one is the most likely to be related. It's upgrading a long list of AndroidX dependencies.

sm-sayedi added a commit to sm-sayedi/zulip-flutter that referenced this issue Jul 1, 2024
(The related flutter_local_notifications_platform_interface plugin is also
upgraded to the latest.)

After the Flutter upstream commit:
  flutter/flutter@f23dbc5
a build error related to flutter_local_notifications plugin occurs when
trying to run the app on Android. The upgrade to flutter_local_notifications ^7.2.0
version resolves the issue.

More about the issue:
  MaikuB/flutter_local_notifications#2329

Fixes: zulip#771
gnprice pushed a commit to sm-sayedi/zulip-flutter that referenced this issue Jul 1, 2024
Also flutter_local_notifications_platform_interface.

After the Flutter upstream commit:
  flutter/flutter@f23dbc5
a build error related to flutter_local_notifications plugin occurs
when trying to run the app on Android. The upgrade to
flutter_local_notifications 17.2.1 resolves the issue.

More about the issue:
  MaikuB/flutter_local_notifications#2329

Fixes: zulip#771
@khaled-0
Copy link

khaled-0 commented Aug 7, 2024

exact error is back on flutter 3.24?
I just saw one of our CI fail with this error
I'll report back with more info soon

@Ko-Dean
Copy link

Ko-Dean commented Aug 8, 2024

I too have similar problem when I run flutter build appbundle.
flutter build version 3.24

Using flutter_local_notifications: ^17.2.1+2 is no problem

@gnprice
Copy link

gnprice commented Aug 8, 2024

Yes, the issue was fixed in #2355 which went out in flutter_local_notifications 17.2.1. If you're seeing the issue on an older version, you need to upgrade.

@cyberpwnn
Copy link

Its is very much not fixed

@gnprice
Copy link

gnprice commented Aug 14, 2024

@cyberpwnn If you include details of what you're seeing, that can make it possible for someone to act on your report.

@Volko61
Copy link

Volko61 commented Aug 14, 2024

@gnprice @cyberpwnn
I have the same error
image

image

@gnprice
Copy link

gnprice commented Aug 15, 2024

@Volko61 Your error message shows you're using version 12.0.4 of this library. That is older than the fix for this issue. I recommend upgrading.

(Upgrading your dependencies is a good idea in general ­— but in particular when there's a bug that's been fixed and you want the fix, upgrading is the way you get the fix.)

@Volko61
Copy link

Volko61 commented Aug 15, 2024

Unfortunately I can't due to to conflicting dependencies.
However, I edited the java file to cast and handle null and now it is working

@SwamyDigitalRaiz
Copy link

SwamyDigitalRaiz commented Aug 24, 2024

@gnprice @cyberpwnn I have the same error image

image

same issue

@benardelia
Copy link

I got this error after update the flutter to the latest release, simply i upgrade the flutter local notification package to the last release.

You can do one of these, down grade flutter to the release that working fine or upgrade the package to the last release.

@theranjithmenon
Copy link

I too got this after updating to latest flutter version. Just update the 'flutter_local_notifications' to latest version.

@ahmedevcode
Copy link

I too have similar problem when I run flutter build appbundle. flutter build version 3.24

Using flutter_local_notifications: ^17.2.1+2 is no problem

thanks this solution slove my issus

@Mohamed-Essam-Mohamed
Copy link

I too have similar problem when I run flutter build appbundle. flutter build version 3.24

Using flutter_local_notifications: ^17.2.1+2 is no problem

thanks this solution solve my issues.

@nbo001
Copy link

nbo001 commented Sep 26, 2024

Just update the 'flutter_local_notifications' to latest version solve this issue

@HabunoGD1809
Copy link

I too have similar problem when I run flutter build appbundle. flutter build version 3.24

Using flutter_local_notifications: ^17.2.1+2 is no problem

Thank' you 🥇

@Anandk02
Copy link

AppData\Local\Pub\Cache\hosted\pub.dev\flutter_local_notifications-16.3.3\android\src\main\java\com\dexterous\flutterlocalnotifications\FlutterLocalNotificationsPlugin.java:1033: error: reference to bigLargeIcon is ambiguous
bigPictureStyle.bigLargeIcon(null);
^
both method bigLargeIcon(Bitmap) in BigPictureStyle and method bigLargeIcon(Icon) in BigPictureStyle match

Manually Fix the Code (Temporary Solution)

  1. Open the file mentioned in the error:
    AppData\Local\Pub\Cache\hosted\pub.dev\flutter_local_notifications-16.3.3\android\src\main\java\com\dexterous\flutterlocalnotifications\FlutterLocalNotificationsPlugin.java

  2. Locate the line causing the error (likely line 1033):
    bigPictureStyle.bigLargeIcon(null);

  3. Explicitly specify the Bitmap version:
    bigPictureStyle.bigLargeIcon((Bitmap) null); --- Paste this code

  4. Save the file and rebuild the project:
    flutter clean
    flutter pub get
    flutter build apk

@Levi-Lesches
Copy link
Contributor

@Anandk02 your error indicates you're on an older version (16.3.3), others are saying you should be able to upgrade to 17.2.1 to fix it.

If you need version 16.3.3, this could be another approach

@ervindobri
Copy link

I'm using simple_push_notifications package which uses version 14.0.0 and this error persists.
Flutter SDK version: 3.24.5+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet