6

I have add Itercom Chat for Customer support or Contact Us. But When I add Intercom sdk dependency
(implementation 'io.intercom.android:intercom-sdk-base:9.+') and App run then crash my App. i get error like below

java.lang.NoSuchMethodError: No virtual method log(ILjava/lang/String;Ljava/lang/Throwable; V in class Lokhttp3/internal/platform/Platform;

or its super classes (declaration of 'okhttp3.internal.platform.Platform' appears in /data/app/com.exampla.app-Opatc6X6ZSZqGt8Wv1Uwty==/base.apk!classes3.dex)

Arti
  • 672
  • 7
  • 19

1 Answers1

19

You have to use the same version of the okHttp library. in my case it was

implementation 'com.squareup.okhttp3:okhttp:4.9.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'

Which was throwing this exception which is

java.lang.NoSuchMethodError: No virtual method log(ILjava/lang/String;Ljava/lang/Throwable; V in class Lokhttp3/internal/platform/Platform;

So fix will be in your build.gradle file you have to use same versions:

implementation 'com.squareup.okhttp3:okhttp:4.9.2'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.2'

It will fix your issue. This is too late to share an answer but might help others also.

Anant Shah
  • 3,744
  • 1
  • 35
  • 48