ishaquehassan / document_scanner_flutter

A document scanner plugin for flutter
MIT License
59 stars 131 forks source link

Manifest merger failed #9

Open Amrokh opened 2 years ago

Amrokh commented 2 years ago

Execution failed for task ':app:processReleaseMainManifest'.

Manifest merger failed : Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/filepaths) from [:image_picker] AndroidManifest.xml:15:17-72 is also present at [com.github.ishaquehassan:AndroidDocumentScanLibrary:1.8.2] AndroidManifest.xml:36:17-55 value=(@xml/provider_paths). Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml to override.

aiman5252 commented 2 years ago

@Amrokh, you need to add the suggestion to <provider> tag.

Here's mine:

<provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.flutter_inappwebview.fileprovider"
            tools:replace="android:authorities"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>

Don't forget to add xmlns:tools="http://schemas.android.com/tools" as well to the <manifest> tag.

Amrokh commented 2 years ago

@Amrokh, you need to add the suggestion to <provider> tag.

Here's mine:

<provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.flutter_inappwebview.fileprovider"
            tools:replace="android:authorities"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>

Don't forget to add xmlns:tools="http://schemas.android.com/tools" as well to the <manifest> tag.

Should I add this in my android>app>src>main>AndroidManifest.xml ? as I've done that and still doesnt work.

Amrokh commented 2 years ago

@aiman5252 Should I add this in my android>app>src>main>AndroidManifest.xml ? or where ? as I've done that and still doesnt work.

miguelflores1993 commented 2 years ago

as I've done that and still doesnt work.

sanjeevinnobit commented 1 year ago

@miguelflores1993 please refer this https://github.com/ishaquehassan/document_scanner_flutter/issues/19#issuecomment-1579374629