0

After adding below line in app gradle

implementation 'com.google.firebase:firebase-crashlytics:17.1.1'

I am getting following error when i build apk

More than one file was found with OS independent path 'okhttp3/internal/publicsuffix/publicsuffixes.gz'

Here are my gradle dependencies

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-beta01'
implementation "com.android.volley:volley:1.1.1"
implementation('org.apache.httpcomponents:httpmime:4.3.6') {
    exclude module: 'httpclient'
}
implementation 'org.apache.httpcomponents:httpclient-android:4.3.5'
implementation "com.github.bumptech.glide:glide:4.9.0"
api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'com.facebook.shimmer:shimmer:0.5.0@aar'

implementation 'com.google.android.libraries.places:places:2.0.0'
implementation 'com.google.firebase:firebase-analytics:17.4.4'

implementation 'androidx.biometric:biometric:1.0.1'
implementation 'com.google.firebase:firebase-messaging:20.1.5'
implementation 'android.arch.work:work-runtime:1.0.1'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.github.tcking:giraffecompressor:0.1.4'

implementation 'com.google.android.exoplayer:exoplayer-core:2.10.5'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.10.5'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.10.5'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.10.5'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.10.5'
implementation project(path: ':mosambeelib')
implementation 'com.google.android.play:core:1.7.3'
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(path: ':aeps')
implementation project(path: ':bbps')
implementation project(path: ':dmt')
implementation project(path: ':razorpay-android-3.8.8')

}

apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics'

When i tried to see packages from project tree i can see double files in okhttp3 packages. Issue

Thanks in advance.Any help will be appreciated.

Joker
  • 537
  • 1
  • 6
  • 19
  • Does this post help? https://stackoverflow.com/questions/44342455/more-than-one-file-was-found-with-os-independent-path-meta-inf-license – Oleg Kodysh Aug 12 '20 at 18:02
  • Yes tried but no luck. I tried also exclude okhttp3 library from crashlytics which build APK successfully but it result in firebase crashlytics not working properly. – Joker Aug 12 '20 at 18:29
  • Sorry, what do you mean by "not working properly", just so I have a better understanding of the issue? – Oleg Kodysh Aug 12 '20 at 18:41
  • App got unresponsive (UI freeze) instead of crash when I put code runtime error. It does not report to firebase console. – Joker Aug 12 '20 at 19:37
  • I just found out that error cause by firebase dependency and module project jar i added have different version of okhttp3 dependencies which conflicts.Any advice. – Joker Aug 13 '20 at 17:11
  • Hmm, I would say if this were a normal dependency pattern, Gradle would generally sort out the right version of okhttp to use, but since it looks like you're embedding a JAR manually, I'm not too sure at this point what can I provide that's helpful. – Oleg Kodysh Aug 14 '20 at 19:17
  • 1
    Thanks Oleg for your time.Its JAR which causing this issue. having same okhttp3 dependency internally as firebase crashlytics.I resolved by replacing updated JAR – Joker Aug 15 '20 at 11:42

0 Answers0