【发布时间】:2017-11-18 23:26:11
【问题描述】:
错误:
NetworkSecurityConfig: No Network Security Config specified, using platform default.
【问题讨论】:
标签: android android-studio android-7.0-nougat
错误:
NetworkSecurityConfig: No Network Security Config specified, using platform default.
【问题讨论】:
标签: android android-studio android-7.0-nougat
是的,旧方法已被弃用,您应该使用这个:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
registerReceiver(new ConnectionCheck(), new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"));
}
【讨论】: