I built an APK with --release
flag.
But still the app is showing in chrome://inspect
.
Is there a way to disable remote debugging.
I have tried adding android:debuggable="false"
in Manifest.xml
Also tried adding "webContentsDebuggingEnabled": false,
in capacitor.config.json
.
Can anyone help me with this.
What is the exact way you build the Apk? When using Capacitor, didn’t you build via Android Studio?
I did with android studio.
command used:
ionic capacitor build android --prod --release --verbose
Ionic commands and its parameters don’t have any effect on the Capacitor native build, you are just building a release web build, but still a debug native build.
From Android Studio you can do a Build → Generate Signed Bundle / APK and install it after it’s generated and your app will be a release app and won’t appear on chrome://inspect
The webContentsDebuggingEnabled
will just disable the WebView debug, but will still be a release build.
Anyway, to make it work, it should go inside android object, something like:
"android": {
"webContentsDebuggingEnabled": false
}
Actually I built with → Generate Signed Bundle / APK
And its still the same
Adding this fixed the issue