alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
816 stars 435 forks source link

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

Open gihankarunarathne opened 6 years ago

gihankarunarathne commented 6 years ago

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.

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 ?

Prashant-Mutnale commented 6 years ago

Same issue here

aMarCruz commented 6 years ago

Same issue with rn-photo-view 1.5.2

dembal1990 commented 6 years ago

+1 Any solution?

kockok commented 6 years ago

Yeah, let me know if fixed.

TayfunCesur commented 6 years ago

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 !

dikshit1 commented 6 years ago

@TayfunCesur it solved the issue thanks

aMarCruz commented 6 years ago

I made my own fork

spearmootz commented 5 years ago

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

burakduganci commented 5 years ago

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

TimothyDLewis commented 5 years ago

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.

spearmootz commented 5 years ago

Glad to have helped!

On Thu, Oct 25, 2018, 2:24 PM Burak Duğancı notifications@github.com 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 .