They've already fixed this. If you enroll in the beta for Android in Google Play, you will get version 1.16.200.x where login to XBox Live works just fine. However, you obviously cannot join any servers using 1.16.40.x
I'm pretty sure I did this a few weeks ago and got 1.16.100.x which worked also, but cannot confirm this now.
I even have this issue on Windows 10, it's not just an Android problem. I also think the fix they rolled out to PS4 last month (1.16.61) may have been a fix for this exact same bug.
@Kinga Please see my comment in this ticket, which I believe links a lot of duplicated reports together: https://bugs.mojang.com/browse/MCPE-98126?focusedCommentId=806862&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-806862
This is the first issue report I can find about this issue, which I am also experiencing on Android with 1.16.40. Enrolling in the Beta program in Google Play and upgrading to 1.16.100.55 appears to have fixed the issue for me.
Other (newer) issues that appear to be filed about the same bug:
Same here - I've not played for a while, and with the latest 1.16.40 update, the game crashes when hitting "Log In". This is on Android, on a Huawei P10.
Similar issues:
OK - I doubt that BDS-12751 is related though, as my BDS server can start just fine, and none of the symptoms for the player which I mention here are mentioned over in the other ticket (apart from that line in the server log).