Xamarin Forms application on Android device crashes with this error.
Xamarin Forms application on Android device crashes with this error.
Hi @ShaileyLalwani-0654 , could you please post the full error log about this problem?If it is convenient for you, could you please post some code snippets or a basic demo so that we can try to reproduce this problem on our side?
Hi @JessieZhang-2116 , I can't share code snippet because of some security policy, above problem is been reported on client user device in Crash Analytical tool, so exactly don't have steps to reproduce. Below is the list of Nuget packages used in the application if that can help:
<PackageReference Include="Acr.UserDialogs" Version="7.1.0.470" />
<PackageReference Include="AiForms.Layouts" Version="1.1.0" />
<PackageReference Include="AWSSDK.S3" Version="3.3.18.2" />
<PackageReference Include="Bugsee.Xamarin" Version="1.10.5" />
<PackageReference Include="DLToolkit.Forms.Controls.FlowListView" Version="2.0.10" />
<PackageReference Include="modernhttpclient-updated" Version="3.3.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="Rg.Plugins.Popup" Version="2.0.0.5" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.68.0" />
<PackageReference Include="sqlite-net-pcl" Version="1.4.118" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.8.0" />
<PackageReference Include="Xam.Plugin.Media" Version="4.4.10-beta" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.617" />
<PackageReference Include="XLabs.IoC" Version="2.0.5782" />
<PackageReference Include="XLabs.Platform" Version="2.0.5782" />
Hi @ShaileyLalwani-0654 , could you please post the full error log about this problem?
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@db81f9c is not valid; is your activity running?
According to the log, it is often due to that it want to display a view (e.g. dialog) on a special page, but now it couldn't find the page (on android ,it's activity).Then it will throw such error log. You can recheck your code.
Hi @JessieZhang-2116 , yes correct! But can you please help me with the solution as to where to check whether is activity is available or not when using Acr.UserDialogs in Xamarin Forms application.
7 people are following this question.