GithubHelp home page GithubHelp logo

Comments (11)

adityagokula2210 avatar adityagokula2210 commented on August 22, 2024

Hello @imayank91
We have already made the changes and now we have removed the jar files for okttp and okio and have added them as Gradle dependencies. So that in case there is conflict, you can easily exclude the okio dependency. This change will be live in the next version of the CometChat Pro android SDK which is 1.8.0 scheduled to go live in a couple of days or latest by early next week. If you wish, you can use the beta version beta-1.7.1 where the changes have been done.
We will let you know once version 1.8.0 is live.

Hope this helps.
Thanks.

from chat-sdk-android.

imayank91 avatar imayank91 commented on August 22, 2024

I tried using the beta-1.7.1, throws an error "The given artifact contains a string literal with a package reference 'android.support.v4.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx."

I think the library is still using the android support library instead of androidx

from chat-sdk-android.

imayank91 avatar imayank91 commented on August 22, 2024

Are you using butterknife? You need to update the version of that so that I can get rid of this error

from chat-sdk-android.

adityagokula2210 avatar adityagokula2210 commented on August 22, 2024

Hello @imayank91
We are not using butterknife in our SDK.
Can you please share your build.gradle file so that I can have a look at what is causing the conflict.

Thanks

from chat-sdk-android.

imayank91 avatar imayank91 commented on August 22, 2024

Here you go

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "androidx.appcompat:appcompat:$appcompat_version"
    implementation "androidx.core:core-ktx:$ktx_version"
    implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
    testImplementation 'junit:junit:4.12'


    //Espresso
    testImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    //cometchat sdk
    implementation ('com.cometchat:pro-android-chat-sdk:beta-1.7.1') {
        exclude module:'org.xmlpull.v1'
    }


    //Mockito
//    androidTestImplementation "org.mockito:mockito-core:2.23.4"
//    androidTestImplementation "org.mockito:mockito-android:2.23.0"

    androidTestImplementation 'org.mockito:mockito-android:2.+'
    implementation "org.mockito:mockito-core:2.+"

//    androidTestImplementation"net.bytebuddy:byte-buddy:1.9.10"
//    androidTestImplementation "net.bytebuddy:byte-buddy-agent:1.9.10"
//    androidTestImplementation "net.bytebuddy:byte-buddy-android:1.9.7"


    // Core library
    implementation 'androidx.test:core:1.2.0'

    // AndroidJUnitRunner and JUnit Rules
    testImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test:runner:1.2.0'

    testImplementation 'androidx.test:rules:1.2.0'
    androidTestImplementation 'androidx.test:rules:1.2.0'

    //Change it back
    //implementation 'androidx.test:runner:1.2.0'
    //implementation 'androidx.test:rules:1.2.0'

    // Assertions
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.ext:truth:1.2.0'
    androidTestImplementation 'com.google.truth:truth:0.42'

    //Roboelectric
    testImplementation 'org.robolectric:robolectric:4.3'
    testImplementation "org.robolectric:shadows-support-v4:3.0"

    //Test Implementation
    testImplementation 'androidx.test:runner:1.2.0'
    testImplementation 'androidx.test.ext:junit:1.1.1'

    androidTestImplementation 'androidx.test.ext:junit:1.1.1'

    implementation 'androidx.fragment:fragment-testing:1.1.0-alpha07'

    //intuit
    implementation "com.intuit.sdp:sdp-android:$intuit_version"
    implementation "com.intuit.ssp:ssp-android:$intuit_version"

    //Navigation components
    implementation "androidx.navigation:navigation-fragment-ktx:$navigationktx_version"
    implementation "androidx.navigation:navigation-ui-ktx:$navigationktx_version"

    //Legacy Support
    implementation "androidx.legacy:legacy-support-v4:$legacysupport_version"

    //View Model
    androidTestImplementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'


    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    //Design Library
    implementation 'com.google.android.material:material:1.1.0-alpha07'

    //Lottie
//    implementation "com.airbnb.android:lottie:3.0.6"
    implementation ("com.airbnb.android:lottie:3.0.6") {
            exclude group: 'com.squareup.okio'
    }

from chat-sdk-android.

adityagokula2210 avatar adityagokula2210 commented on August 22, 2024

@imayank91
Can you also paste the stacktrace of the error that you are getting..?

from chat-sdk-android.

imayank91 avatar imayank91 commented on August 22, 2024

The given artifact contains a string literal with a package reference 'android.support.v4.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.

from chat-sdk-android.

adityagokula2210 avatar adityagokula2210 commented on August 22, 2024

@imayank91
Can you try excluding the 'android.support.v4.widget' dependency from the CometChat dependency by adding the below line to the CometChat dependency
implementation ('com.cometchat:pro-android-chat-sdk:beta-1.7.1') {
exclude module: 'support-v4'
}

Thanks

from chat-sdk-android.

imayank91 avatar imayank91 commented on August 22, 2024

No luck, it's the same

from chat-sdk-android.

imayank91 avatar imayank91 commented on August 22, 2024

I was able to solve this for now using

android.jetifier.blacklist = support-v4

Do you have a plan to migrate the sdk from v4 to androidx.

from chat-sdk-android.

adityagokula2210 avatar adityagokula2210 commented on August 22, 2024

@imayank91
Yes. We have added it to our task list and will take it up as soon as possible. Thank you for pointing this out.

Thanks.

from chat-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.