Flashing Back when using SWindow in Android Project

I’m kinda new to UE5. I am attemting to using swindow in my android project.But, in Android, the game will crush when the function using the swindow is called.However in PC, the code can work well. Can I use swindow in andorid project, and how? My code like:
TSharedRef NewWindow = SNew(SWindow);
UUserWidget* pUserWidget = CreateWnd(pGameInstance);
FSlateApplication::Get().AddWindow(NewWindow, true);
NewWindow->SetContent(pUserWidget->TakeWidget());