react-native-splash-screen: [ERROR] Build faild after update react native and android sdk build tools

I got this error after react-native run-android after update react-native and android sdk build tools with this error:

Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:15:7-34
        is also present at [:react-native-splash-screen] AndroidManifest.xml:12:9-35 value=(true).
        Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:11:5-33:19 to override.

Can you guide me to fix this?

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 8
  • Comments: 15

Most upvoted comments

Apply the suggestion from the logs: In your Manifest, in the <aplication> tag, right under android:theme... add tools:replace="android:allowBackup" also make sure to add in the <manifest> tag right under xmlns:android... add the following xmlns:tools="http://schemas.android.com/tools"

Should be something like:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.yourpackage.name">

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

    <application
      android:name="com.yourpackage.name.MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme"
      tools:replace="android:allowBackup">
   .....

Adding this line what is telling the compiler is to ignore the attribute from the library and listen to the one in your app.

@altaf4web I assume you forgot to add the

xmlns:tools=“http://schemas.android.com/tools

in your manifest root element

You need to do it in your application Manifest, from the package name I’m seeing in your block of code here, seems like you did it on this package Manifest.

You should change it in android/app/src/main/AndroidManifest.xml in your React Native project

In gradle.properties use:

android.useAndroidX=true android.enableJetifier=true

You should open the app in Android Studio, clean and re-build after changing the Manifest

I’m using wix react navigator The build was successful ,But error on app start: Unfortunately app has stopped.

without any error on building