Network problems above android-android9.0

As a novice, I will practice network data request analysis these days. However, no data can be obtained by testing on the real machine. (Virtual machine can).

Then, I know it is the need to increase network access permissions for Android 9.0 and above. . . I don't know what to say, anyway, just adding an Internet will definitely not work.

So I checked a lot of methods, without exception, add an xml file, list configuration, how can a pig like me learn it? It’s too much trouble.

at last! ! ! Found the simple one. Add this code in the manifest file:

android:usesCleartextTraffic="true"

As shown in the figure: the Insert picture description here
real machine test is perfectly solved. It's very nice hahahahaha, learned learned

Guess you like

Origin blog.csdn.net/Willow_Spring/article/details/112604675