pdf-invoice-generator
pdf-invoice-generator copied to clipboard
Couldn't find meta-data for provider with authority me.kariot.invoicegenerator.provider
I'm getting this error ->
java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority me.kariot.invoicegenerator.provider at androidx.core.content.FileProvider.getFileProviderPathsMetaData(FileProvider.java:688) at androidx.core.content.FileProvider.parsePathStrategy(FileProvider.java:719) at androidx.core.content.FileProvider.getPathStrategy(FileProvider.java:669) at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:451) at me.kariot.invoicegenerator.utils.InvoiceGenerator.generatePDF(InvoiceGenerator.kt:132)
On my manifest file, I have this part related to the file provider ->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
And I created this file at res/xml with the provider paths ->
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>
</paths>
It seems all correct, any ideas? My compileSdk is 34 btw