AndroidStudio中提示:Couldn't find meta-data for provider with authority


場景

在配置應用更新時下載完安裝包之后進行安裝中的提示:

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修改為自己的應用對應的包名


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM