I am building an Android app using React Native 0.61 (CLI) and use common MQTT.js packages here: https://www.npmjs.com/package/mqtt(v.3.0.0)
This is my build.gradle
buildToolsVersion = "28.0.3"
minSdkVersion = 25
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
I use WebSocket protocol to connect to my own mqtt broker.
In debug mode, everything works perfectly on any phone. But weird that when I release APK by command (gradlew assembleRelease (signed)), it can not connect to the broker on Android 9+ (both emulator) (Android 8 work well)
It seems there was a problem when compiling to native code.