FileProvider crash - npe attempting to invoke XmlResourceParser on a null String

前端 未结 9 1882
误落风尘
误落风尘 2020-11-28 21:38

This is a part of my manifest:




        
9条回答
  •  庸人自扰
    2020-11-28 22:06

    If you're building your AUTHORITY at runtime using BuildConfig make sure you use the full class name including your package name.

    Bad:

    final String AUTHORITY = BuildConfig.APPLICATION_ID + ".provider";

    Good:

    final String AUTHORITY = com.mycompany.myapp.BuildConfig.APPLICATION_ID + ".provider";

提交回复
热议问题