❔ Xamarin.Forms Android App problem using Application.Context.StartActivity(intent)
Hi, in short, I created a super small Xamarin.Forms Android App.
All I need is just to press a button, that will launch another application.
Then I immedaitely added the button in the myPage.xaml file in the shared Xamarin.Forms project.
About the myPage.xaml.cs file this is the code I binded to the button:
I defined the interface into App.xaml.cs (still shared project) using
Then I implmented it in the Android project by adding some code into MainActivity.cs
The problem is that every time I click the button, for some reason that I don't know, I always get error
System.NullReferenceException: 'Object reference not set to an instance of an object.'
3 Replies
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
I think this has something to do with
I could be wrong, but I've found that including layouts within my activity_main xml file this error dissappears.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.