是否有可能使用字符串资源内部android:networkSecurityConfig在AndroidManifest.xml中定义的?
我有一个这样的配置文件:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config>
<domain includeSubdomains="true">mydomain.com</domain>
<pin-set>
<pin digest="SHA-256">@string/pin</pin>
<pin digest="SHA-256">@string/pin_fallback</pin>
</pin-set>
<trustkit-config enforcePinning="true" disableDefaultReportUri="true">
</trustkit-config>
</domain-config>
</network-security-config>
Run Code Online (Sandbox Code Playgroud)
但我的应用程序似乎没有检测到我在res/values/strings.xml. 不过,硬编码这些字符串效果很好。