react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

[ERROR] Build faild after update react native and android sdk build tools

Open mnlbox opened this issue 7 years ago • 15 comments
trafficstars

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?

mnlbox avatar Apr 08 '18 10:04 mnlbox

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.

caroaguilar avatar Apr 08 '18 20:04 caroaguilar

i had did it , but it still has error

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="org.devio.rn.splashscreen">

    <application
        android:allowBackup="true"
        android:label="@string/app_name"
        android:supportsRtl="true"
        tools:replace="android:allowBackup">

    </application>

</manifest>

error :

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

danialdezfouli avatar Apr 13 '18 21:04 danialdezfouli

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

caroaguilar avatar Apr 13 '18 21:04 caroaguilar

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

without any error on building

danialdezfouli avatar Apr 13 '18 21:04 danialdezfouli

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

caroaguilar avatar Apr 13 '18 21:04 caroaguilar

Do you think it has problem with Wix ?

Clean project Rebuild run android BUILD SUCCESSFUL Unfortunately app has stopped.

danialdezfouli avatar Apr 13 '18 21:04 danialdezfouli

If the build was successful then probably it has something to do with your javascript code, check the terminal where the npm server is running or enable JS debugging, you should probably see an error there.

caroaguilar avatar Apr 13 '18 21:04 caroaguilar

No its not from js Witch navigator are you using ?

danialdezfouli avatar Apr 13 '18 21:04 danialdezfouli

I'm using react-navigation. Again, check your JS logs because I don't think the error has to do with this issue of react-native-splash-screen

caroaguilar avatar Apr 13 '18 21:04 caroaguilar

Hey, buddy. look this, https://github.com/crazycodeboy/react-native-splash-screen/pull/180

Cologne88 avatar Apr 16 '18 03:04 Cologne88

Hey Caroaguilar, Getting this error after follow your instructions... The prefix "tools" for attribute "tools:replace" associated with an element type "application" is not bound.

capture

altaf4web avatar May 12 '18 14:05 altaf4web

@altaf4web I assume you forgot to add the

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

in your manifest root element

joustava avatar May 17 '18 07:05 joustava

In gradle.properties use:

android.useAndroidX=true android.enableJetifier=true

douglassoldan avatar Aug 03 '19 00:08 douglassoldan

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').

File 'D:\AndroidStudioProjects\GRATIN\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.

Hey this is the error i am getting while using the splash screen i have tried your method but i usually get this error lot of times i dont know why!!! PLEASE HELP

anaskhanooni1 avatar Jun 13 '21 03:06 anaskhanooni1

@anaskhanooni1 You are using exFat filesystem format? https://github.com/flutter/flutter/issues/76668#issuecomment-841921164

sunnylqm avatar Aug 12 '21 02:08 sunnylqm