aseemnishad / react-native-android-scanner

React native implementation of AndroidScannerDemo https://github.com/jhansireddy/AndroidScannerDemo
MIT License
12 stars 9 forks source link

Attribute application@allowBackup is also present at [:scanlibrary] #1

Open zedtux opened 6 years ago

zedtux commented 6 years ago

I'm giving a try to your project and I have the following error when running react-native run-android :

> Task :app:processDebugManifest FAILED
/Users/guillaumehain/Developments/companion/android/app/src/main/AndroidManifest.xml:12:7-34 Error:
        Attribute application@allowBackup value=(false) from AndroidManifest.xml:12:7-34
        is also present at [:scanlibrary] AndroidManifest.xml:20:9-35 value=(true).
        Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:8:5-25:19 to override.

Here is my AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.domain.myapp">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.CAMERA" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>
aseemnishad commented 6 years ago

@zedtux thank you for trying the library, can you try android:allowBackup="true" instead of "false".

zedtux commented 6 years ago

I even removed the line on my side, but then got #2.

oferRounds commented 6 years ago

+1