Comments (11)
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.
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.
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.
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.
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.
@imayank91
Can you also paste the stacktrace of the error that you are getting..?
from chat-sdk-android.
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.
@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.
No luck, it's the same
from chat-sdk-android.
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.
@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)
- Voice calling is only working on loudspeakers HOT 2
- [2.0.1] Audio/Video Call shows blank screen on network loss while call is running. HOT 1
- [2.0.1] Reasons for minSdkVersion 21 HOT 2
- [2.0.0-beta4] Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'void org.jivesoftware.smack.AbstractXMPPConnection.addAsyncStanzaListener(org.jivesoftware.smack.StanzaListener, org.jivesoftware.smack.filter.StanzaFilter)' on a null object reference HOT 1
- [2.0.0-beta4] Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'java.lang.String org.jivesoftware.smack.AbstractXMPPConnection.getUser()' on a null object reference com.cometchat.pro.core.XMPPConnectionService.subscribeToNode HOT 1
- [2.0.2] Multiple Calls handling in the SDK HOT 1
- [2.0.2] Custom message on delete returns null HOT 1
- Customization in calling UI HOT 2
- Could not resolve com.squareup.okhttp3:okhttp:3.12.+ HOT 12
- Exception cannot convert String to JSON HOT 1
- Timeout Issue while connecting to a Call HOT 2
- calls not working on Android 10 (version 2.0.6) HOT 16
- Entry name 'XPP3_1.1.4c_VERSION' HOT 7
- [Min Sdk 19, Target Sdk 29] Unable to bind toolbar on setSupportActionBar while initClickAction
- [2.1.0] User's Last Active time is incorrect HOT 3
- [2.1.6] My whole application start crashing just because of cometchat internal crash HOT 18
- [2.3.5] Calls are not working on some countries on Android Version Only HOT 1
- [2.3.5] Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'int java.util.Timer.purge()' on a null object reference com.cometchat.pro.core.PingController.stopPing HOT 3
- Could not run on android studio HOT 1
- [Feature] Expose websocket connection status HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-sdk-android.