In the Audience Network Android SDK, we use 127.0.0.1 (localhost) as a caching proxy to cache media files in the SDK. Since Android P, cleartext traffic (unencrypted HTTP) will be blocked by default, which will affect the functionality of media caching of the SDK and could affect user experience and ads revenue.
现在,如果我尝试在我的 AndroidManifest
中添加此行 android:networkSecurityConfig="@xml/network_security_config"
我会收到警告,即 API 24 中使用了属性 networkSecurityConfig以及更高版本,因为我的应用支持 minSdkVersion 15 。
我应该如何添加 android:networkSecurityConfig
才不会影响小于 24 的 API
最佳答案
默认情况下它是这样工作的。旧设备无法识别 android:networkSecurityConfig
,因为它在 API 级别 24 (Android 7.0) 之前不存在。
关于android - 如何为小于 24 的 API 添加 Android 网络安全配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52691058/