我正试着通过000webhost.com建立一个数据库。每当我从android studio运行应用程序时,我都会在事件日志中看到这条消息。有谁知道如何解决这个问题吗?非常感谢!
发布于 2019-08-17 19:25:20
我也有同样的问题。请在清单中的应用程序标记中添加此行。我希望它也能对你有所帮助。
android:usesCleartextTraffic="true"
发布于 2016-12-27 01:36:09
您收到的消息不是错误;它只是让您知道您没有使用网络安全配置。如果你想添加一个,看看Android开发者网站上的这个页面:https://developer.android.com/training/articles/security-config.html。
发布于 2018-08-19 17:53:58
我也有同样的问题。这不是网络权限问题,而是线程问题。下面的代码帮助我解决了这个问题。Put在主活动中
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (android.os.Build.VERSION.SDK_INT > 9)
{
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
https://stackoverflow.com/questions/39933345
复制相似问题