-3

Tell me how you can fix it?

AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />

<application
    ...
    android:networkSecurityConfig="@xml/network_security_config"
    android:usesCleartextTraffic="true"
    ...>
    <activity>
       ...
    </activity>
</application>

network_security_config.xml

<network_security_config>
    <base-config cleartextTrafficPermitted="true"/>
</network_security_config>
j.ss
  • 47
  • 1
  • 2
  • 11
  • https://stackoverflow.com/questions/53984725/networksecurityconfig-no-network-security-config-specified-using-platform-defa/53984915#53984915 – Quick learner Jul 22 '20 at 10:29
  • 2
    "Tell me how you can fix it?" -- there is nothing to fix. This is a log message. It is not a crash. – CommonsWare Jul 22 '20 at 11:08
  • @CommonsWare the application is immediately closed when this error is exited – j.ss Jul 22 '20 at 11:17
  • Then you should be looking for [a stack trace](https://stackoverflow.com/q/3988788/115145). This is an ordinary message and does not indicate a problem, let alone one that would cause an app process to be terminated. – CommonsWare Jul 22 '20 at 11:42
  • post strack trace here also – Quick learner Jul 22 '20 at 11:53
  • I found my mistake, it was not related to the manifest settings. Thank you for your help – j.ss Jul 22 '20 at 12:25
  • Have you fix this issue yet? @j.ss – K.Sopheak Nov 18 '22 at 09:27
  • 3
    @K.Sopheak: This question is poorly written, so it is unclear what you are expecting for an answer. I suggest that you ask a separate Stack Overflow question where you provide a [mcve] and explain, in detail, what your problem is and what your symptoms are. – CommonsWare Nov 18 '22 at 13:24

2 Answers2

0
<?xml version="1.0" encoding="utf-8"?>
  <network-security-config>
  <domain-config cleartextTrafficPermitted="true">
     <domain includeSubdomains="true">secure.example.com</domain>
  </domain-config>
</network-security-config>
Saiful Sazib
  • 451
  • 1
  • 3
  • 14
-2

if you are using this android:networkSecurityConfig then remove android:usesCleartextTraffic="true"

For reference NetworkSecurityConfig: No Network Security Config specified, using platform default

Quick learner
  • 10,632
  • 4
  • 45
  • 55