場景
在配置應用更新時下載完安裝包之后進行安裝中的提示:
Couldn't find meta-data for provider with authority 后面跟你的包名
博客:
https://blog.csdn.net/badao_liumang_qizhi
關注公眾號
霸道的程序猿
獲取編程相關電子書、教程推送與免費下載。
實現
找到AndroidManifest.xml中配置FileProvider的地方
<!--在安卓7.0以上禁止在應用外部公開 file://URI--> <provider android:name="androidx.core.content.FileProvider" android:authorities="com.bado.你的包名.fileProvider" android:grantUriPermissions="true" android:exported="false"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_path" /> <!--上面的resource="xxx"指的是一個文件,file_path是文件名--> </provider>
將這里的authorities后面的xxx.xx.xx.fileProvider修改為自己的應用對應的包名