guys, I am working on an android application for which I need external application dependency(.aar file) library application has its own file provider and my application have its own.
library work well when I run it as a separate app but when I include it my application then camera functionality not working. I get the following error
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
following the manifest file of the application
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
and the following is a manifest file of the lib module
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.ma.bot.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
both application and lib module have different package name how I add this 2 file providers into the application I also try including multiple file providers using, but I get XML parse error on app compilation.
android:authorities="${applicationId}.provider;com.ma.bot.provider"
how to solve this.