just toasted this problem and suggestions here either outdated or makes less sense. You dont need to separately install NDK, VS22 is deliviring it together with SDK installation. So there is a folder called NDKbundle under the SDK folder. Only problem here is that you need to make sure that you have the correct NDK. You cannot use latest version of NDK if you arent using everything up to date and if you comply with the NDK criterias. Here you can find the history
https://developer.android.com/ndk/downloads/revision_history
For example, if you are NDK23 you cannot use if you target APIs 16, 17, and 18 as it is stated in the release notes "Jelly Bean (APIs 16, 17, and 18) will not be supported in the next NDK release. ".
For me was the case, I had recently VS22 repair and somehow, SDK installed the latest version of NDK and i was getting this error. Once i downgraded back to NDK21 version, it worked like a charm.