Hi Support Team,
I was able to successfully setup the API and Angular project on my machine. But I am facing issues while setting up the Xamarin Mobile app, am getting the following error message:
I am using Visual Studio 2019 and running the mobile app on Emulator. I need your help for setting up the Xamarin Mobile App.
Thanks & Regards, Prabhat
16 Answer(s)
-
0
Hi, please share your ANZ angular version.
is your API project running at http://10.0.2.2:22742 ?
also, please share the full error stacktrace.
-
0
It seems to be a Xamarin bug... Close Visual Studio, delete all BIN & OBJ folders and rebuild the project.
-
0
Hi,
I have download the Latest v7.0.0 from the Download page (I guess this is what you mean by ANZ angular version).
My API project is running at http://192.168.0.103:22742 , I had already tried by changing the following constant in the Xamarin App: private const string LocalhostIp = "192.168.0.103"; It also gave the same exception.
I just have the exception details as shown in the Emulator snapshot above.
Closing the visual studio and deleting the bin & obj folder did not work as well.
-
0
Hi Support Team,
I cached the excpetion, following is the stack trace:-
at Flurl.Http.FlurlRequest.HandleExceptionAsync (Flurl.Http.HttpCall call, System.Exception ex, System.Threading.CancellationToken token) [0x0011d] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x003a1] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x004bb] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.HttpResponseMessageExtensions.ReceiveJson[T] (System.Threading.Tasks.Task`1[TResult] response) [0x0006e] in <7be22aadf26d4808b35d54cc18db202b>:0 at PinkWish.ApiClient.AbpApiClient.GetAsync[T] (System.String endpoint, System.Object queryParameters, System.String accessToken, System.Boolean stripAjaxResponseWrapper) [0x0007e] in F:\ShoppingApp\PinkWish\aspnet-core\src\PinkWish.Application.Client\ApiClient\AbpApiClient.cs:206 at PinkWish.ApiClient.AbpApiClient.GetAnonymousAsync[T] (System.String endpoint) [0x00029] in F:\ShoppingApp\PinkWish\aspnet-core\src\PinkWish.Application.Client\ApiClient\AbpApiClient.cs:190 at PinkWish.Configuration.UserConfigurationService.GetAsync (System.Boolean isUserLoggedIn) [0x000cd] in F:\ShoppingApp\PinkWish\aspnet-core\src\PinkWish.Application.Client\Configuration\UserConfigurationService.cs:29
-
0
how do you start your host? If you run the host from Visual Studio, you cannot connect to it. you need to run the host from command line with
dotnet run
. Check out the debugging section https://docs.aspnetzero.com/documents/aspnet-core-angular/latest/Development-Guide-Xamarin#host -
0
I am starting the Host from Command line only, by running the follwoing commands:
SET ASPNETCORE_ENVIRONMENT=Development SET ASPNETCORE_URLS=http://*:22742 dotnet run
-
0
-
0
Hi,
I have already tried with both IP Addresses: -
- Emulators.Andorid (Which is 10.0.2.2 as shown in the screenshot)
- 192.168.0.103 (screenshot is not attached) Both gives the same exception.
I am using the Android Emulator, so will set the the IP as follows: private const string LocalhostIp = Emulators.Android;
I am following the setup document and had tried these things already except opening the API project from Mobile browser. I will try that and will let you know the result. Thanks for your help !!
-
0
private const string LocalhostIp = --use your local computer IP address--
and also try to access the URL from mobile browser. lastly try to use with a real Android device
-
0
-
0
I have tried with the real android device, it is also giving the same "class not found exception". Could it be because of the Visual studio 2019 Community Edition?
-
0
I think your problem is not related to network.
disable linker and try again https://docs.microsoft.com/en-us/xamarin/android/deploy-test/linker#linker-behavior
-
0
also see this post https://support.aspnetzero.com/QA/Questions/6025#answer-ead76bf3-b751-dbfe-9bbd-39ea6b7d07ce
-
0
Disabling linker did not work as well.
-
0
I Downgraded the visual studio from VS2019 to VS 2017 and it is working fine in Visual studio 2017 community edition. This is kind of workaround for using the ANZ code. Do let me know if you guys can suggest anything to make it working in visual studio 2019.
-
0
I'm also using VS2019 without any problem. Reinstall your Visual Studio 2019 with full Xamarin features.