NoClassDefFoundError for OkHttpClient
The latest version of Piccasso use an older version of Okhttp, you need to use a new dependency compile ‘com.squareup.okhttp3:okhttp:3.2.0’ compile ‘com.squareup.picasso:picasso:2.5.2’ compile ‘com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2’ Example: File httpCacheDirectory = new File(getCacheDir(), “picasso-cache”); Cache cache = new Cache(httpCacheDirectory, 10 * 1024 * 1024); OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder().cache(cache); Picasso.Builder picassoBuilder = new Picasso.Builder(getApplicationContext()); picassoBuilder.downloader(new OkHttp3Downloader(clientBuilder.build())); Picasso picasso … Read more