美文网首页
主工程和依赖之间冲突,no cache 类解决

主工程和依赖之间冲突,no cache 类解决

作者: androidfan | 来源:发表于2022-11-25 18:12 被阅读0次

1.主工程和依赖之间 fileprovider冲突

<provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.xinan.police.FILE_PROVIDER_PATHS"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                tools:replace="android:resource"
                android:resource="@xml/file_paths_public" />
        </provider>

需要在provider中的meta-data下添加tools:replace="android:resource"

2.程序出现no cache xxxx
File->Settings->Build,Execution,Deployment->Compiler的Command-line Options:选项,如果有配置去掉


image.png

参考文章:https://blog.csdn.net/wangyiqianyi/article/details/122354631

相关文章

网友评论

      本文标题:主工程和依赖之间冲突,no cache 类解决

      本文链接:https://www.haomeiwen.com/subject/ncyxfdtx.html