ToolbarItemBadgeSample icon indicating copy to clipboard operation
ToolbarItemBadgeSample copied to clipboard

Object reference not set to instance of object.

Open WeiChun0723 opened this issue 6 years ago • 4 comments

I followed the example provided but i get object reference not set to instance of object when press the stepper to call the dependency service.

WeiChun0723 avatar Oct 31 '18 07:10 WeiChun0723

i got the same error , did you solve it ?

alkharashiam avatar Oct 04 '19 17:10 alkharashiam

Hi guys Please add [assembly: Dependency(typeof(ToolbarItemBadgeService))] in ToolbarItemBadgeService class both Android and iOS above namspace

lijusparkt avatar Mar 13 '20 07:03 lijusparkt

I have found a solution and commented on another thread. Please check if it works https://github.com/CrossGeeks/ToolbarItemBadgeSample/issues/11#issuecomment-669008974

AlvinKwong avatar Aug 05 '20 06:08 AlvinKwong

What worked for me was to add this on OnCreate function in MainActivity

CrossCurrentActivity.Current.Init(this, bundle);

Anghelina-Elena avatar Sep 27 '22 12:09 Anghelina-Elena