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

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/OkHttpClient; #1158

Closed
yubaokang opened this issue Apr 27, 2016 · 3 comments

Comments

@yubaokang
Copy link

    <meta-data
        android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule"
        android:value="GlideModule" />
     compile 'com.github.bumptech.glide:glide:3.7.0'
     compile 'com.github.bumptech.glide:okhttp-integration:1.4.0@aar'
     compile 'com.squareup.okhttp3:okhttp:3.2.0'


    Glide.with(context).load(uri).into(imageView);

error: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/OkHttpClient;

@TWiStErRob
Copy link
Collaborator

Decide if you're using okhttp (v2) or okhttp3 and update your code:

compile 'com.github.bumptech.glide:okhttp-integration:1.4.0@aar'
compile 'com.squareup.okhttp:okhttp:2.7.5'

or

compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
compile 'com.squareup.okhttp3:okhttp:3.2.0'

Also either

<meta-data
        android:name="com.bumptech.glide.integration.okhttp3.OkHttpGlideModule"
        android:value="GlideModule" />
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0'

or just

compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'

Read https://github.com/bumptech/glide/wiki/Integration-Libraries for more details. I'll update that page with the new OkHttp3 lib as well.

@yubaokang
Copy link
Author

Problem solved, thank you

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

No branches or pull requests

2 participants