在android8.0以上的手機上,讀取共享文件時,如apk更新的編程中,我們把apk下載后,要安裝時,去讀取這個apk文件就出現(xiàn)了如下錯誤:
Failed to find configured root that contains
...
解決方法:
在file_provider_paths.xml文件中添加root-path 標(biāo)簽
<path>
<root-path name="root_path" path="."/>
</path>
在android8.0以上的手機上,讀取共享文件時,如apk更新的編程中,我們把apk下載后,要安裝時,去讀取這個apk文件就出現(xiàn)了如下錯誤:
Failed to find configured root that contains
...
解決方法:
在file_provider_paths.xml文件中添加root-path 標(biāo)簽
<path>
<root-path name="root_path" path="."/>
</path>