I tried using okhttp and picasso (following this answer) for disk caching of images that was i downloading from firebase storage.Now app gives exception and crashes.I have seen these posts post 1,post 2 but no relevent solution is found.i also tried to clean and rebuild project but no luck.
Here is build.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "social.com.networking.social.media.app" minSdkVersion 16 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' multiDexEnabled true } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.1.0' compile 'com.android.support:design:25.1.0' compile 'br.com.mauker.materialsearchview:materialsearchview:1.2.0' compile 'com.alirezaafkar:toolbar:1.1.1' compile 'com.github.mancj:MaterialSearchBar:0.3.5' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.daimajia.slider:library:1.1.5@aar' compile 'com.google.code.gson:gson:2.6.2' compile 'com.google.firebase:firebase-core:10.0.1' compile 'com.google.firebase:firebase-ads:10.0.1' compile 'com.google.firebase:firebase-messaging:10.0.1' compile "com.google.firebase:firebase-auth:10.0.1" compile 'com.google.firebase:firebase-storage:10.0.1' compile 'com.google.firebase:firebase-crash:10.0.1' compile 'com.squareup.okhttp3:okhttp:3.2.0' compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2' compile 'com.android.support:multidex:1.0.1' compile 'org.parceler:parceler-api:1.1.6' annotationProcessor 'org.parceler:parceler:1.1.6' testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services'
Full Stacktrace
Edit -1: i have enabled multidex as Redman said but still gives same error.According to this developer.android.com/studio/build/multidex.html#keep i need to decide which classes are necessary in base apk .how i determine which classes are necessary?