Conflict manifest config during build

So after successful attempt at trying out the app sample with latest sdk. i tried to integrate the library into my app and now im getting this manifest merge error.

> Task :app:processDebugManifest FAILED
/Users/mike/Desktop/ConsumerApp/android/app/src/main/AndroidManifest.xml:48:9-35 Error:
        Attribute application@allowBackup value=(true) from AndroidManifest.xml:48:9-35
        is also present at [com.cometchat:pro-android-calls-sdk:0.0.1-beta2] AndroidManifest.xml:29:9-36 value=(false).
        Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:45:5-120:19 to override.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

so if i add tools:replace="android:allowBackup" to my application, i can build the app successfully, but it appear to throw error for my interal SVG library. can you help me find a solution to this? i followed the setup instruction for app build.gradle ald. and im currently on v2.1.0-beta3 of the sdk. here is my build.gradle.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.minSdkVersion = 21
    ext.kotlin_version = '1.3.72'
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        maven {
          url "https://dl.bintray.com/cometchat/pro"
        }
        google()

        maven { url "https://jitpack.io" }
    }
}

subprojects {
    afterEvaluate { project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 28
            }
        }
    }
}

/**
 + Project-wide Gradle configuration properties
 */
ext {
    _reactNativeVersion = '0.61.2'
    reactNativeVersion= '0.61.2'
    reactNative='0.61.2'

    compileSdkVersion = 28
    targetSdkVersion = 28
    buildToolsVersion = "28.0.3"
    supportLibVersion = "28.0.0"
    googlePlayServicesVersion = "15.0.1"
    googlePlayServicesMapsVersion = "16.1.0"
    androidMapsUtilsVersion = "0.5+"
}

would appreciate any input. i also opened a github issue at here

Hello @mike_van,

Can you please let us know which SVG library are you using? Also can you please share the error you are getting?

Warm Regards,

CometChat Pro
Mayur Bhandari

Hi @mayur.bhandari so my svg libraries are

"react-native-svg": "9.13.6",
"react-native-svg-icon": "0.7.0", 

and the svg error im getting is like follwing:

Hi @mike_van,

Can you please let us know when do you get this error exactly? Providing a little more detail can help us get to the root of the issue.

Warm Regards,

CometChat Pro
Mayur Bhandari

Hello @mike_van,

Did this error start occurring after updating to v2.1.0-beta3? I can see that your react-native-svg is outdated and the latest version of that package is 12.1.0. Can you please update to the latest version of react-native-svg. Also, if this error is specifically occurring after updating to v2.1.0-beta3, can you please share the code snippet of the SVG icon system you have created using react-native-svg-icon. So that we can try it on our end and get to the root of the issue.

For reference:

  1. https://github.com/react-native-community/react-native-svg/issues/1084
  2. https://github.com/react-native-community/react-native-svg/issues/1418

And there are more issues which are open on the react-native-svg repository. You can view all those issues on the link given below.

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.