Down Tips gives you the easiest and best solution to set SDK location at the filesystem root:
Step 1:
Firstly open the settings then go to the appearance & behaviour click system settings then Android SDK then select any location and install it to set SDK location at the filesystem.
Step 2:
Open SDK setup click Android SDK installed select Android SDK Platform Then Next.
Step 3:
If you want to change any settings then click Previous otherwise click Next.
Step 4:
Click Finish.
It’s Ready which is what you want.
How Spacer Filling Remaining Space on Jetpack Compose