cometchat / chat-sdk-react-native

Voice & Video Calling and Text Chat SDK for React Native
Other
18 stars 17 forks source link

Conflict manifest config during build #14

Closed mike-van closed 4 years ago

mike-van commented 4 years ago

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+"
}
mike-van commented 4 years ago

is there anyway i can change the allowBackup value in the cometchat-call application xml

mayur-bhandari commented 4 years ago

Hello @Mike-Van ,

We have fixed this issue in the latest beta release v2.1.0-beta6.

mike-van commented 4 years ago

awesome news, let me try to install the sdk :D