我正在尝试设置Admob调解与Facebook受众网络。这里的教程是https://developers.facebook.com/docs/audience-network/android-network-security-config
建议我用以下代码修改我的Android安全配置:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
...
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
</domain-config>
...
</network-security-config>然而,当我这样做时,我的应用程序在开发模式下停止工作:

Metro服务器正在运行。我完全可以通过我的手机Chrome访问http://127.0.0.1:8081。只是这个安全设置阻止了我的应用程序从这个地址获取JS包。
目前,我在开发应用程序时禁用此安全配置,并在构建生产捆绑包时再次启用它,但这不是长期可持续的。
我该如何解决这个问题呢?
发布于 2020-08-09 02:19:55
添加这个
<domain includeSubdomains="true">localhost</domain>有帮助
https://stackoverflow.com/questions/63288628
复制相似问题