Search code examples
javaandroidgradlegroovylive-connect-sdk

ConnectSDK-Lite: mergeDebugResources error when building


How did I encounter this problem?

I tried to add the ConnctSDK-Lite lib to my Android project from the original GitHub page with the code bellow;

compile 'com.connectsdk:connect-sdk-android-lite:1.6.0'

Since i use gradle 7.0 and above i used implementation instead of compile;

implementation 'com.connectsdk:connect-sdk-android-lite:1.6.0'

After that i changed the code with Android Studio's Quick-Fixes option and code turns to this (I also tried without the changing the code.);

implementation libs.connect.sdk.android.lite

The build process went and finished without errors but whenever i try to run the code on the emulator or a real device with USB Debugging i got build error.


The error I encountered:

Illegal char <:> at index 40: com.test.test.app-mergeDebugResources-31:/values/values.xml

First of all. I dont have a file named values.xml at app/res/values directory. I looked through errors and find this directory

C:\Users\garag\AndroidStudioProjects\test\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values\values.xml

Since the file in question is 13.639 lines long, I cannot publish the entire file, but I get 2 'URI Not Registered' errors on the 2nd line But if you need to see whole file, you can see with this Google Drive link.

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="http://schemas.android.com/tools" xmlns:ns2="urn:oasis:names:tc:xliff:document:1.2">
    <attr format="enum" name="animateCircleAngleTo">
        <enum name="bestChoice" value="0"/>
        <enum name="closest" value="1"/>
        <enum name="clockwise" value="2"/>
        <enum name="antiClockwise" value="3"/>
        <enum name="constraint" value="4"/>
    </attr>

I don't know what i need to do.


I looked at this and to this. In these questions, the people who asked the question also added other libraries, but my problem is as follows; I opened a new Empty Views Activity and just added ConnectSDK-Lite. I tried the suggestions in these questions but it didn't work, the same error continues.

Here is my build files:

build.gradle (Project Level)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
}

build.gradle (App Level)

plugins {
    alias(libs.plugins.android.application)
}

android {
    namespace 'com.test.test'
    compileSdk 35

    defaultConfig {
        applicationId "com.test.test"
        minSdk 33
        targetSdk 35
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
}

dependencies {

    implementation libs.appcompat
    implementation libs.material
    implementation libs.activity
    implementation libs.constraintlayout
    implementation libs.connect.sdk.android.lite
    testImplementation libs.junit
    androidTestImplementation libs.ext.junit
    androidTestImplementation libs.espresso.core
}

Solution

  • Solution:

    I still don't know what exactly is causing this error, but I found a solution for ConnectSDK-Lite at least. When I checked on the Jitpack website, versions 1.5.0, 1.6.0, 1.6.2 seem to have errors. Although version 2.0.0 seems to be error-free, but when I tested it, I encountered the same error again. The only version I could run on the emulator without errors was 1.4.4.