Question: how to setup ndk in android studio?
Answer: With a project open, click Tools > SDK Manager.
Click the SDK Tools tab.
Select the Show Package Details checkbox.
Select the NDK (Side by side) checkbox and the checkboxes below it that correspond to the NDK versions you want to install. ... 
Click OK. ... 
Click OK.