I tryed everything in order to solve this problem and now am sure its a bug ,
steps i did is :
-Download android studio
*download sdk platform and sdk tools
*download android build tool and ndk
-set path environment to
* users/name/SDk
*users/name/SDk/ndk
-VS 2017 with android sdk ,
i opened native tool commend VS
go to godot source code that i downloaded from github
tryped scons p=android
and then i get this error
scons: Reading SConscript files ...
No valid target platform selected.
The following were detected:
windows
winrt
Please run scons again with argument: platform=<string>
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
if its not a bug please show me the steps to fix it
did you follow all these steps?
https://docs.godotengine.org/en/3.1/development/compiling/compiling_for_android.html
i go back and check again , now am sure that i did everything right .
accpet for the thing about gradlew i didnt understand what to do with it
if you can please explain more to me,
it mostly is caused with wrong environment settings.
try double check about ANDROID_HOME, ANDROID_NDK_ROOT path.
it's better not to have a space in the path.
dude here is an image
https://i.ibb.co/TMPNS5R/Capture.jpg
i tryed alot of differnet enviroment and as you can see
it still doesnt work!
ANDROID_NDK_ROOT looks having space characters. like...
ANDROID_ NDK_ ROOT isn't it?
nope , everything is right!!!
HELPPPPPPPP!!!
OK, so if everything is right I assume it's working fine then ?
Please tone down a little bit if you want to have some help.
Are you sure your sdk and ndk are installed in the right folders (/users/.../SDk and /users/.../SDk/ndk as stated in your environment variables? Please verify this and drop a screenshot or your folder structure.
I don't understand why I got downvote from you.
everything is right then it shouldn't have a problem.
here is screenshots for you:
https://i.ibb.co/Pc2Bs48/53764511-389488761629678-1010792549926830080-n.jpg
https://i.ibb.co/zhb8N1j/Capture.jpg
https://i.ibb.co/nqpykP9/xz.jpg
https://i.ibb.co/0jZYDTr/sa.jpg
I don't understand why I got downvote from you.
everything is right then it shouldn't have a problem.
sorry for downvote i didnt think its bad thing
guys , i dont think they are fix for this , can a someone put it as bug
DId you accepted the licence for the sdk as asked in the tutorial ?
By running `tools/bin/sdkmanager --licenses
yes i did , and after i read you comment i checked again and yes i did.
this so so bad i did everything right , i tryed to fix this error for the last 2 weeks!!
There is a space is ANDROID_NDK_ROOT. Look at your own screenshot it is very clearly there
ANDROID_ NDK_ROOT
ANDROID_NDK_HOME
Due to the font rendering it's not as pronounced as here but you can clearly see it.

I Fix it, by downloading all the extra tools in android studio and it worked, that maybe because scons didnt detect the NDK that i downloaded , and android studio didnt allow me to download older version.
The version that scons work with is NDK R13 for some reason it didnt work with newer one.
I hope this topic help anothers who have same problem.
And Thanks.
(btw, for the space in the screenshot it maybe because of low resulotion i checked it again and it doesnt have this space )
Thanks again
Most helpful comment
ANDROID_NDK_ROOTlooks having space characters. like...ANDROID_ NDK_ ROOTisn't it?