How does, Build APKs work? In Android Studio

I have ionic capacitor, I have perforrmed Build->Build Bundle(s)/APK(s)->Build APK(s) in Android Studio. What i dont understand is sometimes it work sometimes I get the “Webpage not Available”. Also I have noticed that when i make a changes in my code, it also get reflected on the app, which is build already.

Can someone shed some light on me, on what really is going on. Also is there a proper way to create a apk in ionic?

Any help would be appriciated!!!

Looks like you forgot to remove the server.url property of the capacitor config file and you are pointing to the dev server, so if the server is off you get the “Webpage not Available” and if it’s on you get the new changes.