I am not sure if the answer by @MuhammadKamal worked for me but it may have put me on the right track. I think more than just the latest NDK are needed for this to work properly. I was previously using Android Studio 4.2.1 but was sticking to older versions of CMake and NDK and used Gradle Plugin 4.2.1.
To make the debug symbols to be generated I updated all my build.gradle files and now the android application bundle (AAB) looks different as it did before and the native-debug-symbols.zip was also not generated on my system.
I believe that NDK version 22.1.7171670 is required for debug symbols to be added to the AAB automatically.
android.ndkVersion '22.1.7171670'
And I also switched to a newer version of CMake:
externalNativeBuild.cmake.version "3.18.1"
.
And I am now using Gradle Plugin 4.2.2 in Android Studio 4.2.2.
On my system Gradle was complaining about the debug symbol level setting when it was set to 'FULL'. It seems the value has to be in lower case. This could have been a change introduced in the newer gradle plugin version:
android.buildTypes.release.ndk.debugSymbolLevel = 'full'
.
I am not entirely sure which of these changes if not all made the debug symbols get embedded into the AAB automatically and the zip file generated. If just the newer NDK is needed please feel free to accept the answer by @MuhammadKamal. I wanted to document for others what worked in my build to fill in any blanks and potentially help resolve the issue.
The debug symbols will be stored inside the AAB in this location:
BUNDLE-METADATA\com.android.tools.build.debugsymbols\<ABI>\libX.dbg
Strictly speaking @DevDasTour was asking about the APK and the native-debug-symbols.zip only. From my testing the APK cannot contain the debug symbols while the ABB can.
If you still wish to upload the APK and the debug symbols separately to Google Play the native-debug-symbols.zip are generated here:
<project_name>\build\outputs\native-debug-symbols\release\native-debug-symbols.zip
BTW the AAB will also contain the Java de-obfuscation mapping so that makes it just one file to uploaded to Google Play.