Executing tasks: [clean]
Configuration on demand is an incubating feature. NDK is missing a \"platforms\" directory. If you are using NDK, verify th
This probably happens because Android Studio will automatically download the latest version of NDK which doesn't have a platforms directory (No idea why! Would be awesome if someone can clarify that).
This is what worked for me. Using the SDK manager. That is the icon in the top right corner of Android Studio that looks like this . Go to SDK Tools tab. In the right bottom corner, enable Show Package Details and install NDK version 20.0.5594570 (You can remove the newer version that was installed automatically by Android Studio to save space).
Note that the NDK will be installed in the location shown in Android SDK Location. For me that is set to /home/. Which means I can find the NDK at /home/
Hit apply and when it's done go to file called local.properties and add this.
ndk.dir=/home//.local/android-sdk/ndk/20.0.5594570
Adapt the path to where you have your NDK installed.