新增provider时报错 Manifest merger failed with multiple errors, see logs

在AndroidManifest.xml中新增provider时报了错误:

    Manifest merger failed with multiple errors, see logs

新增provider的代码:


            

经过反复检查发现,是依赖的库中有相关name的provider引用,所以引起了manifest报错,我们新增一个MyFileProvider继承FileProvider,manifest的provider的name改为MyFileProvider即可,代码如下:

//MyFileProvider
public class MyFileProvider extends FileProvider{
}

//manifest中配置

            

 

你可能感兴趣的:(android)