I would get a higher end Chromebook. They run Linux, have a built in android container, nice keyboards, touch screen, often have 360 hinges if that matters to you.
I've got the middle one in that pic and it's almost as fast as my 24 core desktop. Like others said, get 16 gig of ram. Edit: i use VS code which is less beastly than Android studio, but there's no need to run an emulator because it's already built in, accelerated.
These things have been the source of so much frustration for me over the years. I think you are the only person I've ever seen IRL or online who didn't immediately regret the purchase after about 3-6 months.
I returned my $4000 MacBook, I don't like the keyboard layout and thought it had poor performance for the hardware. I would go for a Linux laptop but other than that I prefer Chromebooks and have been using them for 10ish years.