question

KariTalltjarn avatar image
0 Votes"
KariTalltjarn asked KariTalltjarn commented

Confusing app behaviour Xamarin Android Navigation to page from Main.

I have an app working without issues when in debug mode.
But when the app is built as a release and new APK file is installed in mobile the App crashes at just one command?

The below works perfect in debug mode:

await Navigation.PushAsync(new TextFileBrowserPage());

BUT crashes when built as release?
Prior release builds have been working. So this is a new issue.

This is just for this page and all other navigations works fine in both builds.

I have this in App.CS
MainPage = new NavigationPage(new MainPage());

I guess more details are needed for you to answer?

I have of course rebooted, closed/started, etc.

I am pretty unexperinced so pleasa be clear when asking for additional information! :-)

Regards Kari T

dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just addition to above.
It works perfect when build for Iphone.
Both Debug/Release.
Kari T

0 Votes 0 ·

Hi, Do you have a repo for this app?
If you don’t please upload this app to GitHub and share the link here to help you. Thanks.

0 Votes 0 ·

First, thanks for answer/guiding!
I have looked into how to share code via Nuget.

This is first time for me and I have looked around hove to make a package and publish.
Found many links about this but somewhat confused what to consider/do. Using Visual Studio 2019.
Any advise about links for good info?

BUT

When looking around I came into my Nuget menu in the solution and saw there was 12 updates on installed packages.
I performed the updates and tried again to make a release build.
Voila, the installed package worked again in my 3 android phones!
So I do not have any clue why the upgrade solved the issue but currenmtly it is OK for me.

So this case can be closed but will perhaps come back if it occurs again. I hope not!

Thanks!

1 Vote 1 ·

0 Answers