this is ctrl c + ctrl v from my reddit post which appears to be helping people but few people saw it there:
This post is for anyone who watched all the YouTube tutorials but still fails after trying hours to export their game onto Android platform due to the stupid sdk settings (me).
I am still a beginner and this post is just to share my experience.
1. Use sdkmanager command line tool
Some will think that command line tool is scary and hard (me in my first year uni) but for Godot export, sdkmanager command line tool is a lot easier and faster as all you need for Godot is sdk and downloading android studio is much more inconvenient. Also, I somehow encounter an 11-year-old bug when using Android Studio where the sdk manager greyed out. I’ve also seen comments under tutorials about similar issues, so I highly recommend learning a bit about terminal which will help you in your future life anyway.
tutorial on how to download sdkmanager command line tool is on official Godot document
2. Instruction on Godot doc might not apply to your computer (proof by it happens to me)
If you have downloaded sdkmanager command line tool and the command godot document provides cannot run
sdkmanager --sdk_root=<android_sdk_path> “platform-tools” “build-tools;34.0.0” “platforms;android-34” “cmdline-tools;latest” “cmake;3.10.2.4988404” “ndk;23.2.8568313”
(which is this)
Try the following steps and run command again with each step until it works:
cd (the directory you placed your sdkmanager, all the way to bin folder)
replacing sdkmanager in the command with .\sdkmanager.bat, don’t forget to replace android_sdk_path with your own file path where you want to place sdk in.
If terminal says access denied, run your terminal in admin mode. (This did not work for me but who knows)
if it still fails, replace the command with:
.\sdkmanager.bat --install "platform-tools" "build-tools;34.0.0" "platforms;android-34" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;23.2.8568313"
which as you can see manually install everything
it might stuck for a while and throw tons of errors, but once the terminal shows some legal contract thingy press y + enter and all the sdkcomponent you need will be downloaded. It will be downloaded into the folder where you placed your SDK command line tools in.
Now go back to the tutorial you are watching and finish the other steps.