How to build an Android APK file without using Android Studio in a Capacitor project?

Totally Agree.
Capacitor uses the native IDE for each platform in order to provide required configuration, and to build, test, and deploy apps.

I found an article on this. I think it might valuable. But it is for cordova. It is applicable for capacitor too

Thank you so much . It really helpful