Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not know how to start App,Pls someone give me some advice? #548

Open
roooneychina opened this issue Sep 25, 2024 · 4 comments
Open

Do not know how to start App,Pls someone give me some advice? #548

roooneychina opened this issue Sep 25, 2024 · 4 comments

Comments

@roooneychina
Copy link

app loaderror

First I open eShop.Web.slnf using VS2022.start eshop.AppHost
then I open eShop.sln using VS2022 ,start HybridApp,chocing android local device,

at last,connect to PC via my android cellphone USB,in order to run the eshop APP ,but the app prompt:an unhandled error has occurred.Reload. is there someone could give me some advice. Do I need to change some configration? Many thanks

@zikezhang
Copy link

Hi @roooneychina ,

you might refer to the video: https://www.youtube.com/watch?v=vRZ8ucGac8M

@roooneychina
Copy link
Author

Hi @roooneychina ,

you might refer to the video: https://www.youtube.com/watch?v=vRZ8ucGac8M

Many thanks, let me try it later

@jamesmontemagno
Copy link
Member

If you have the API running, double check the mobile bff url.

Inside of the HybridApp project in MauiProgram.cs you will see:

internal static string MobileBffHost = "http://localhost:11632/";

That is where it is trying to reach it. Run the app on Windows and that should work for you.

For Android it is complicated with emulators as they can't talk localhost and need http clear text setup. This is setup in the normal clientapp. It could be setup like this: https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/local-web-services?view=net-maui-8.0#android

I have done it in this branch for .NET 9: #581

Specifically: 48a9da8

@roooneychina
Copy link
Author

If you have the API running, double check the mobile bff url.

Inside of the HybridApp project in MauiProgram.cs you will see:

internal static string MobileBffHost = "http://localhost:11632/";
That is where it is trying to reach it. Run the app on Windows and that should work for you.

For Android it is complicated with emulators as they can't talk localhost and need http clear text setup. This is setup in the normal clientapp. It could be setup like this: https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/local-web-services?view=net-maui-8.0#android

I have done it in this branch for .NET 9: #581

Specifically: 48a9da8

Many thanks for your help.I do not know how to connect my android device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants