. Advertisement .
..3..
. Advertisement .
..4..
It is terrible because I encounter the ”no network security config specified, using platform default” error when I use socket.io-client-java
:
mSocket = IO.socket("http://192.168.1.10:11111", opts);
Can you give me some advice to solve this problem?
The cause: This occurs to the API versions 28 and up because they no longer support HTTP requests; you must change if you still wish to accept HTTP or localhost requests.
Solution: This error can be solved by these below steps:
Step 1:
In Android Manifiest, in tag application add:
Step 2:
Create in folder
app\src\main\res\xml
this filenetwork_security_config.xml
and write this:Step 3:
inside tag application add this tag: