Using Java KiteConnect in Android

Jinesh510
Hi,

Including the library mentioned in https://github.com/zerodhatech/javakiteconnect. Kiteconnect.jar in Android app throws duplicate dependency errors.
Duplicate Modules - okhttp3, okio, gson
Mostly it is because I have retrofit included as well. Can you please suggest me how shall one go about solving this ?

Thanks.
  • Jinesh510
    I have currently resolved it by excluding those dependencies from retrofit. Let me know if there is a better way to solve it.
    Thanks.
  • Jinesh510
    But I am not able to use Retrofit post this change -
    Error - java.lang.NoSuchMethodError: No static method get(Ljava/lang/String;)Lokhttp3/HttpUrl; in class Lokhttp3/HttpUrl; or its super classes (declaration of 'okhttp3.HttpUrl'....)
  • sujith
    You may have to clone the repository and make changes to make HTTP calls using the Retrofit in order to use it.
  • Rajvardhan
    Hi Jinesh510,
    Have you resolved specified error? I'm facing the exact same error in Android app.
Sign In or Register to comment.