question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.MissingMethodException: Method 'Android.App.Notification/Builder.SetChannelId' not found.

See original GitHub issue

Version 3.2.1 works fine, but versions 3.3.0 and higher have the following exception:

-		ex	{System.MissingMethodException: Method 'Android.App.Notification/Builder.SetChannelId' not found.
  at Plugin.Toasts.ToastNotification+<>c__DisplayClass5_0.<Notify>b__0 () [0x00054] in D:\Source\Repos\Toasts.Forms.Plugin\Toasts.Forms.Plugin.Droid\ToastNotification.cs:44 
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Threading.Tasks.Task.Execute () [0x00010] in <657aa8fea4454dc898a9e5f379c58734>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at Plugin.Toasts.ToastNotification+<Notify>d__5.MoveNext () [0x00031] in D:\Source\Repos\Toasts.Forms.Plugin\Toasts.Forms.Plugin.Droid\ToastNotification.cs:33 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 
  at LoginViewModel+<NavigateToRegisterPageAsync>d__32.MoveNext () [0x00066] in LoginViewModel.cs:187 }	System.MissingMethodException

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
PostImpaticacommented, May 23, 2018

@cassionandi I would write a dependency service that creates toasts. This is what I’ve started doing when I run out of options. I did this recently when I found that the xam.plugins.messaging plugin was forcing my xamarin ios project to want to install .netstandard 1.6 and a bunch of other packages.

HERE is a stack overflow showing you how to create toasts using a dependency service in iOS (look at Alex Chengalan’s solution). iOS is always the most difficult for me so that is where I start. If I can find an easy solution for iOS it’s normally even easier in Android so then I proceed.

1reaction
PostImpaticacommented, Apr 18, 2018

I dropped down to 3.2.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

not able to use setChannelId in android 5.0 and above
Try this one, worked fine for me. public void showNotification() { NotificationManager notificationManager = (NotificationManager) ...
Read more >
Notification.Builder | Android Developers
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found