Building TF 2.14 using bazel with later NDK versions failing
@nikraj01 Thank you for raising the issue!
Could you please go to SDK location find NDK folder and check the folders if one of them is empty or corrupted? If so please delete it and let it use the latest version you have,
Thank you! Hi @sushreebarsa ,

Doesn't look like both NDK folders are empty/corrupted to me

AndroidSDK/ndk/21.4.7075529$ ls
build         meta       ndk-gdb    ndk-which  NOTICE.toolchain  platforms  python-packages  shader-tools  source.properties  sysroot     wrap.sh
CHANGELOG.md  ndk-build  ndk-stack  NOTICE     package.xml       prebuilt   README.md        simpleperf    sources            toolchains


AndroidSDK/ndk/25.0.8775105$ ls
build         meta       ndk-gdb   ndk-stack  NOTICE            package.xml  python-packages  shader-tools  source.properties  toolchains
CHANGELOG.md  ndk-build  ndk-lldb  ndk-which  NOTICE.toolchain  prebuilt     README.md        simpleperf    sources            wrap.sh

Thanks @nikraj01 Sorry for the late response!
Could you please follow the steps from the document [here](https://www.tensorflow.org/lite/android/lite_build) for the android build. Please let us know which NDK version you are specifying? The current recommended version is 21e, which may be found [here](https://developer.android.com/ndk/downloads/older_releases.html#ndk-21e-downloads).
Thank you! Hello @sushreebarsa ,

Thanks for the reply. I am not building Tflite for Android, I am specifically building Tf Delegate Performance Benchmark tool. 
Its working fine if I use NDK version 21. But I suppose later versions of NDK should also support it?

Thanks @nikraj01 Thanks for your reply!
I could see there has been a [PR](https://github.com/tensorflow/tensorflow/pull/59422) already raised before on this. Could you please refer to this [PR](https://github.com/tensorflow/tensorflow/pull/59422#issuecomment-1733975406) and let us know if it helps?
It seems like nkd v25 will be supported in tf-nightly and the next release. 
Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62046">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62046">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.14

### Custom code

Yes

### OS platform and distribution

Ubuntu 20.04

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

6.1.0

### GCC/compiler version

_No response_

### CUDA/cuDNN version

Building without CUDA support

### GPU model and memory

_No response_

### Current behavior?

In order to build Tensorflow Delegate Performance Benchmark tool, I am building latest TF (2.14) from source (using ./configure) using bazel 6.1.0 and Android NDK version 25.0.8775105. But this fails

WARNING: The NDK version in /home/<username>/AndroidSDK/ndk/25.0.8775105 is 25, which is not supported by Bazel (officially supported versions: [19, 20, 21]). Please use another version. Compiling Android targets may result in confusing errors.

Traceback (most recent call last):
  File "./configure.py", line 1466, in <module>
    main()
  File "./configure.py", line 1439, in main
    create_android_ndk_rule(environ_cp)
  File "./configure.py", line 658, in create_android_ndk_rule
    get_ndk_api_level(environ_cp, android_ndk_home_path))
  File "./configure.py", line 752, in get_ndk_api_level
    api_levels = sorted(os.listdir(platforms))
FileNotFoundError: [Errno 2] No such file or directory: '/home/<username>/AndroidSDK/ndk/25.0.8775105/platforms'

As far as I understand later NDK versions don't have platforms/

As a user I should be able to build tensorflow using later NDK versions. Could someone have a look into this please.
 

### Standalone code to reproduce the issue

```shell
Steps followed:
1. Clone TF : git clone --recurse-submodules https://github.com/tensorflow/tensorflow.git
2. Clone bazel: https://bazel.build/install/ubuntu
3. Install AndroidSDK: sudo snap install androidsdk
4. Install Android NDK : androidsdk --install "ndk;25.0.8775105"
5. Install android sources: androidsdk --install "sources;android-30"
6. Install platforms: androidsdk --install "platforms;android-30"
7. Install platform-tools: androidsdk --install "platform-tools"
8. Run ./configure
These are the options we provided:

Please specify the location of python. [Default is /usr/bin/python3]:
 
 Found possible Python library paths:
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.8/dist-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3/dist-packages]
 
Do you wish to build TensorFlow with ROCm support? [y/N]:
No ROCm support will be enabled for TensorFlow.
 
Do you wish to build TensorFlow with CUDA support? [y/N]:
No CUDA support will be enabled for TensorFlow.
 
Do you wish to download a fresh release of clang? (Experimental) [y/N]:
Clang will not be downloaded.
 
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: --config=opt
 
 
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: y
Searching for NDK and SDK installations.
 
Please specify the home path of the Android NDK to use. [Default is /home/<username>/Android/Sdk/ndk-bundle]: <provide path here>
```


### Relevant log output

_No response_