Skip to content

Commit

Permalink
Fix manifest merger failed error
Browse files Browse the repository at this point in the history
Fix the following error:
Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:9:116-143
	is also present at [us.feras.mdv:markdownview:1.1.0] AndroidManifest.xml:12:9-35 value=(true).
	Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:9:3-18:17 to override.
  • Loading branch information
Cosmin Marc authored Mar 13, 2019
1 parent d198bd1 commit 436a8f3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ project(':react-native-documentscanner-android').projectDir = new File(rootProje
include ':openCVLibrary310'
project(':openCVLibrary310').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-documentscanner-android/android/openCVLibrary310')
```
#### In android/app/src/main/AndroidManifest.xml
Change manifest header to avoid "Manifest merger error". After you add `xmlns:tools="http://schemas.android.com/tools"` should look like this:
```
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.<yourAppName>" xmlns:tools="http://schemas.android.com/tools">
```
Add `tools:replace="android:allowBackup"` in <application tag. It should look like this:
```
<application tools:replace="android:allowBackup" android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme">
```
Add Camera permissions request:
```
<uses-permission android:name="android.permission.CAMERA" />
```

### Usage

Expand Down Expand Up @@ -109,4 +122,4 @@ The images are saved in `Documents` folder.

Inspired in android project
- https://github.com/ctodobom/OpenNoteScanner
- https://github.com/Michaelvilleneuve/react-native-document-scanner
- https://github.com/Michaelvilleneuve/react-native-document-scanner

0 comments on commit 436a8f3

Please sign in to comment.