Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Program type already present: okhttp3.RequestBody #86

Open
maxutolen opened this issue Jul 5, 2019 · 0 comments
Open

Error: Program type already present: okhttp3.RequestBody #86

maxutolen opened this issue Jul 5, 2019 · 0 comments

Comments

@maxutolen
Copy link

maxutolen commented Jul 5, 2019

Hello community!

I'm trying to integrate "com.liveperson.android:lp_messaging_sdk:3.9.0" library. But I'm getting this error while compiling an application:
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: okhttp3.RequestBody$1

I suppose it's related to okhttp3 library, soI tried to exclude okhttp3 from LivePersonChat library, because I already have okhttp3 in my application. I did like this, but it didn't work:
implementation("com.liveperson.android:lp_messaging_sdk:3.9.0") { exclude group: 'com.squareup.okhttp3.RequestBody', module: 'okhttp' }
Also tried excluding like these, still no success:
exclude group: "com.squareup.okhttp3" // didn't work
exclude group: 'com.squareup.okhttp', module: 'okhttp' // didn't work

I'm using the following versions of okhttp3 library:
implementation "com.squareup.okhttp3:okhttp:3.8.1"
implementation "com.squareup.okhttp3:logging-interceptor:3.8.1"
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.4.1"
Tried to change the okhttp3 version till 4.0.0, but no result.

Please, assist me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant