FreshChat SDK 集成 -> UncaughtException:java.lang.IncompatibleClassChangeError
FreshChat SDK integration -> UncaughtException: java.lang.IncompatibleClassChangeError
// On button click i am tring to open Freshchat -> Conversation screen
Freshchat.showConversations(getApplicationContext());
E/UncaughtException: java.lang.IncompatibleClassChangeError: Class 'com.freshchat.consumer.sdk.activity.ChannelListActivity' does not implement interface 'androidx.lifecycle.LifecycleOwner' in call to 'androidx.lifecycle.Lifecycle androidx.lifecycle.LifecycleOwner.getLifecycle()' (declaration of 'androidx.lifecycle.LiveData' appears in /data/app/com.healthpole.dentists.debug-X-W_P0gIA-gphdr95wNXzg==/base.apk)
at androidx.lifecycle.LiveData.observe(LiveData.java:172)
at androidx.loader.app.LoaderManagerImpl$LoaderInfo.setCallback(LoaderManagerImpl.java:100)
at androidx.loader.app.LoaderManagerImpl.createAndInstallLoader(LoaderManagerImpl.java:400)
at androidx.loader.app.LoaderManagerImpl.restartLoader(LoaderManagerImpl.java:447)
at com.freshchat.consumer.sdk.activity.ChannelListActivity.F(Unknown Source:46)
at com.freshchat.consumer.sdk.activity.ChannelListActivity.onResume(Unknown Source:80)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
at android.app.Activity.performResume(Activity.java:7292)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3776)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Project Configuration
minimumSdkVersion -> 21
compileSdkVersion -> 28
FreshChat SDK version -> com.github.freshdesk:freshchat-android:2.6.0
and migrated to androidX
NOTE
因为这个库没有迁移到 androidX 所以
我尝试使用 constraintlayout 的更新版本
还使用了 appcompat-v7-28.0.0 and support-v4-28.0.0 lib 仍然面临同样的问题。
所以我的问题是我还需要更改或添加哪些依赖项?此问题的解决方法是什么?
所以我向 FreshChat 团队提出了这个问题,他们告诉我们更新 appcompact
库的依赖项,如果仍未解决,则更新其他核心 AndroidX 库。
所以我已经将 appcompact
库更新为 androidx.appcompat:appcompat:1.1.0-beta01
,它现在工作正常
// On button click i am tring to open Freshchat -> Conversation screen
Freshchat.showConversations(getApplicationContext());
E/UncaughtException: java.lang.IncompatibleClassChangeError: Class 'com.freshchat.consumer.sdk.activity.ChannelListActivity' does not implement interface 'androidx.lifecycle.LifecycleOwner' in call to 'androidx.lifecycle.Lifecycle androidx.lifecycle.LifecycleOwner.getLifecycle()' (declaration of 'androidx.lifecycle.LiveData' appears in /data/app/com.healthpole.dentists.debug-X-W_P0gIA-gphdr95wNXzg==/base.apk)
at androidx.lifecycle.LiveData.observe(LiveData.java:172)
at androidx.loader.app.LoaderManagerImpl$LoaderInfo.setCallback(LoaderManagerImpl.java:100)
at androidx.loader.app.LoaderManagerImpl.createAndInstallLoader(LoaderManagerImpl.java:400)
at androidx.loader.app.LoaderManagerImpl.restartLoader(LoaderManagerImpl.java:447)
at com.freshchat.consumer.sdk.activity.ChannelListActivity.F(Unknown Source:46)
at com.freshchat.consumer.sdk.activity.ChannelListActivity.onResume(Unknown Source:80)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
at android.app.Activity.performResume(Activity.java:7292)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3776)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Project Configuration
minimumSdkVersion -> 21
compileSdkVersion -> 28
FreshChat SDK version -> com.github.freshdesk:freshchat-android:2.6.0
and migrated to androidX
NOTE
因为这个库没有迁移到 androidX 所以
我尝试使用 constraintlayout 的更新版本
还使用了 appcompat-v7-28.0.0 and support-v4-28.0.0 lib 仍然面临同样的问题。
所以我的问题是我还需要更改或添加哪些依赖项?此问题的解决方法是什么?
所以我向 FreshChat 团队提出了这个问题,他们告诉我们更新 appcompact
库的依赖项,如果仍未解决,则更新其他核心 AndroidX 库。
所以我已经将 appcompact
库更新为 androidx.appcompat:appcompat:1.1.0-beta01
,它现在工作正常