Error:
* Error running Gradle:NDK is missing a "platformsdirectory.If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\~UserName~\AppData\Local\Android\sdk\ndk-bundle
FAILURE: Build failed with an exception.
* Where: Build File 'C:\Users\~UserName~\AndroidStudioProjects\sandwich\android\app\build.gradle'
If you face this error, make sure if NDK is available in the given path or not., The path is present in the error, which is something like C:\Users\~UserName~\AppData\Local\Android\sdk\ndk-bundle..Verify if the files exist there, otherwise change that from project structure.
To access Project Structure, go to File -> Other Settings -> Default Project Structure. It will show a window as below.
![](http://www.fluttercentral.com/Uploads/f5a6e1f1-6d32-434d-b951-b46df32c3f6f.PNGwidth="50%height="auto](
Hope this helps.
Thanks,Srikanth