Closed WindWZQ closed 6 years ago
I have same issue. If you add these lines, it solves.
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
Ah this is because onAddress("www.baidu.com") will have to be resolved and will cause a network request. I will fix this in the next version.
Should be fixed in 0.4.0 release, please reopen if not
I'm using the ping with url.But give me a NetworkOnMainThreadException.
Here's the code: