react-native-photo-view icon indicating copy to clipboard operation
react-native-photo-view copied to clipboard

Manifest merger failed : [me.relex:photodraweeview:1.0.0] AndroidManifest.xml:10:9-35 value=(true)

Open gihankarunarathne opened this issue 7 years ago • 11 comments

After installing react-native-photo-view, I got following error while run react-native run-android (but working with react-native run-ios).

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:16:7-34 is also present at [me.relex:photodraweeview:1.0.0] AndroidManifest.xml:10:9-35 value=(true). Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:14:5-34:19 to override.

As it suggested, I fixed the issue by adding tools:replace="android:allowBackup into the main menifest file. According to the merging priorities of manifest files, it'll override.

But as suggested in this article of 2 lines in Manifest to remove before sharing your Android Library, the better way of handling it is, handle inside the library.

What need to be done : Can we set Attribute application@allowBackup to value=(false) inside the library @alwx ?

gihankarunarathne avatar Jul 25 '17 17:07 gihankarunarathne

Same issue here

prashant4dev avatar Dec 29 '17 12:12 prashant4dev

Same issue with rn-photo-view 1.5.2

aMarCruz avatar Apr 06 '18 23:04 aMarCruz

+1 Any solution?

dembal1990 avatar Apr 26 '18 08:04 dembal1990

Yeah, let me know if fixed.

kockok avatar May 16 '18 15:05 kockok

Hey guys. I found the solution by thinking deep. The thing is, there is an attribute for andriod application that called by allowbackup In your default application's manifest file, that value is false. But in rn-viewpager's manifest, that value is true by default. This causes conflict normally. You must fix that value. In my side, I changed my applications manifest value with true and fixed !

TayfunCesur avatar May 30 '18 18:05 TayfunCesur

@TayfunCesur it solved the issue thanks

dikshit1 avatar Jul 02 '18 05:07 dikshit1

I made my own fork

aMarCruz avatar Jul 02 '18 17:07 aMarCruz

i did it by adding the following

xmlns:tools="http://schemas.android.com/tools"
tools:replace="allowBackup"

to android/app/src/main/AndroidManifest.xml where allowBackup is present

spearmootz avatar Oct 10 '18 17:10 spearmootz

@spearmootz thanks bro. It solved the issue, thanks.

burakduganci avatar Oct 25 '18 18:10 burakduganci

My error had a suggestion:

Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:10:5-27:19 to override.

@spearmootz's Solution was a little off for me. Using tools:replace="allowBackup" caused another error, as allowBackup was missing the android: prefix. Final solution should like like:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 ...
  <application
    xmlns:tools="http://schemas.android.com/tools"
    tools:replace="android:allowBackup"
    ...
    android:allowBackup="false"

Adding that allowed compile to continue.

TimothyDLewis avatar Oct 25 '18 19:10 TimothyDLewis

Glad to have helped!

On Thu, Oct 25, 2018, 2:24 PM Burak Duğancı [email protected] wrote:

@spearmootz https://github.com/spearmootz thanks bro. It solved the issue, thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alwx/react-native-photo-view/issues/75#issuecomment-433156224, or mute the thread https://github.com/notifications/unsubscribe-auth/AS0qyr4tcBCU0PjV2Be8XGKMxk4TxCVgks5uogHVgaJpZM4Oi4at .

spearmootz avatar Oct 25 '18 19:10 spearmootz