Open DominicD opened 7 years ago
It seems that Strompath SDK uses com.squareup.okhttp3:okhttp:3.1.2 which happens to be a problem if I also use retrofit. This is the log I get:
E/AndroidRuntime: FATAL EXCEPTION: Stormpath Http Dispatcher Process: com.example.noq.noq, PID: 28358 java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/http/HttpEngine; at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:219) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:129) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) 02-26 18:42:59.862 28358-28658/com.example.noq.noq E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.http.HttpEngine" on path: DexPathList[[dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-support-annotations-25.1.0_2846279fca1dfb66d05499be1393db77d5988d85-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-scanditsdk-android-5.1.0_eed328481af32bc982e6dcefac876383cf062fb0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxrelay-2.0.0_4393c3dee2a0036bb461303903a604627ca5f7ec-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxjava-2.0.4_1cc002c6641b7c97b50df13a2983206117c8d3a9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit2-rxjava2-adapter-1.0.0_d99487ab33af021214285a1b3ebeace8fc761e8f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit-2.2.0_24534348a92cc8f33cc21f30be9a39060b33a646-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-reactive-streams-1.0.0_15e8605c1c67f559aa28e458b60e7898b6a18758-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-picasso-2.5.2_744a1a6af30295e0c9e724df1a526efa958509ef-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okio-1.11.0_6b723ec26b2c36ccffc759ac5b154cf36285fb29-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okhttp-3.6.0_2ef602b3bbd061559b4816f09ade04ffc34d5992-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-app-compat-1.4.5_fdf0146ace81d2fb409b0b90cecd298b2db443b3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-android-1.4.5_4533750a09e7f9561dba79046873dc29d4e063c0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-1.4.5_ae879d2498905e1821bdd3125f6001dec6a2f78e-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moshi-1.1.0_2115cb3a6738d24b7d8ea9c3ea6866b782b064b9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-logging-interceptor-3.1.2_bd769c8a7fca5733cd928c73a9d51df3e1cca06b-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.reactivex.rxjava2-rxandroid-2.0.1_7b7362975c9e1a2fd780a9ea75d3843ec22f1d1c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.card-android-sdk-5.5.0_90001f267d88790f577cdd80869bfaeaf295aada-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-gson-2.7_ac753a502a58b0f7ff8d540a82afe551bff57762-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-converter-gson-2.1.0_57f7eec7348edaf870fd767eda56e3bfbe30863c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-constraint-layout-solver-1.0.0_772160a327dd64eab9e1b9bf4584879112b8a869-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.stormpath.sdk-stormpath-sdk-android 02-26 18:42:59.875 28358-28658/com.example.noq.noq E/AndroidRuntime: -2.0_ac54960b4e664d6b3eba0672ebc4668365b2982f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.paypal.sdk-paypal-android-sdk-2.15.3_906f63da0ee53c30b5f6764bd3dcafd873a1f314-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-vision-10.0.1_52f0cb163aea49ac27b71ccf67451dc8e29408ea-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-tasks-10.0.1_f86d1460bf7cc9529ff2e7fae30b73b898ed871f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-10.0.1_d8cef71b0b116606dbe6f7639fc17f69e0b4f2a5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-base-10.0.1_09fff8038baf8d21f752fe16a5062178f6e191ad-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support.constraint-constraint-layout-1.0.0_af413e7f6405b0df10c7954b0029dc9888bcd093-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-transition-25.1.0_a3840f75a2d1132cf51ddd2ee6722fdce1176391-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-vector-drawable-25.1.0_ed6db6d0ea1ab64ab4ba64412564d350a8136cf6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-v4-25.1.0_7fa19a15fb50beb0f25fb87a15ee6da09d4d4b05-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-media-compat-25.1.0_21e735725f3c9e8eecf8b3488e734d16955e9f92-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-fragment-25.1.0_ce62c4777fafea1fa3a3e66a8572a56b1b818ddf-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-core-utils-25.1.0_9b2338a7e8542b6ba4840a34278020e8d13ebb37-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-core-ui-25.1.0_06aa38440fdf176f6a53acb6ea45070df986707f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-compat-25.1.0_5463ae65073f2c00ba9d7c99ae87100e0141612b-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-recyclerview-v7-25.1.0_be17cf7d86913b352e81f78e24188a1fdbe60dc4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-design-25.1.0_2a67580d3170eef81162b67606052bff1260e382-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-customtabs-23.3.0_7bd090753de8c175011db4dfe5fa43aa018e9259-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-appcompat-v7-25.1.0_3ab44d8670d63507c1fe400a8a7c52c042319baf-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-25.1.0_a73ada558d288a780a7031c1ad115d8f2a2b5c73-classes.dex"],nativeLibraryDirectories=[/data/app/com.example.noq.noq-1/lib/arm64, /data/app/com.example.noq.noq-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:90) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 19 more 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: exClass=java.lang.ClassNotFoundException 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: exMsg=Didn't find class "okhttp3.internal.http.HttpEngine" on path: DexPathList[[dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-support-annotations-25.1.0_2846279fca1dfb66d05499be1393db77d5988d85-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-scanditsdk-android-5.1.0_eed328481af32bc982e6dcefac876383cf062fb0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxrelay-2.0.0_4393c3dee2a0036bb461303903a604627ca5f7ec-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxjava-2.0.4_1cc002c6641b7c97b50df13a2983206117c8d3a9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit2-rxjava2-adapter-1.0.0_d99487ab33af021214285a1b3ebeace8fc761e8f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit-2.2.0_24534348a92cc8f33cc21f30be9a39060b33a646-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-reactive-streams-1.0.0_15e8605c1c67f559aa28e458b60e7898b6a18758-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-picasso-2.5.2_744a1a6af30295e0c9e724df1a526efa958509ef-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okio-1.11.0_6b723ec26b2c36ccffc759ac5b154cf36285fb29-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okhttp-3.6.0_2ef602b3bbd061559b4816f09ade04ffc34d5992-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-app-compat-1.4.5_fdf0146ace81d2fb409b0b90cecd298b2db443b3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-android-1.4.5_4533750a09e7f9561dba79046873dc29d4e063c0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-1.4.5_ae879d2498905e1821bdd3125f6001dec6a2f78e-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moshi-1.1.0_2115cb3a6738d24b7d8ea9c3ea6866b782b064b9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-logging-interceptor-3.1.2_bd769c8a7fca5733cd928c73a9d51df3e1cca06b-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.reactivex.rxjava2-rxandroid-2.0.1_7b7362975c9e1a2fd780a9ea75d3843ec22f1d1c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.card-android-sdk-5.5.0_90001f267d88790f577cdd80869bfaeaf295aada-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-gson-2.7_ac753a502a58b0f7ff8d540a82afe551bff57762-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-converter-gson-2.1.0_57f7eec7348edaf870fd767eda56e3bfbe30863c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-constraint-layout-solver-1.0.0_772160a327dd64eab9e1b9bf4584879112b8a869-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.stormpath.sdk-stormpath-sdk-android-2.0_ac54960b4e664d6b3eba0672ebc4668365b2982f-classes.dex", dex file "/dat 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: file=BaseDexClassLoader.java 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: class=dalvik.system.BaseDexClassLoader 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: method=findClass line=56 02-26 18:42:59.881 28358-28658/com.example.noq.noq D/Error: ERR: stack=java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/http/HttpEngine; at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:219) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:129) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.http.HttpEngine" on path: DexPathList[[dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-support-annotations-25.1.0_2846279fca1dfb66d05499be1393db77d5988d85-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-r
The Solution I came up with I found here: http://stackoverflow.com/questions/31402447/dont-use-later-library-version-from-transitive-dependency-in-gradle
So I added this in my build.gradle for the Project:
allprojects { configurations.all { resolutionStrategy.force 'com.squareup.okhttp3:okhttp:3.1.2' } repositories { jcenter() } }
This seems to work, however I have no idea if this affects Retrofit or the other libraries I use so I don't know if this is a good workaround. Does anybody know a better solution?
It seems that Strompath SDK uses com.squareup.okhttp3:okhttp:3.1.2 which happens to be a problem if I also use retrofit. This is the log I get:
E/AndroidRuntime: FATAL EXCEPTION: Stormpath Http Dispatcher Process: com.example.noq.noq, PID: 28358 java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/http/HttpEngine; at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:219) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:129) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) 02-26 18:42:59.862 28358-28658/com.example.noq.noq E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.http.HttpEngine" on path: DexPathList[[dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-support-annotations-25.1.0_2846279fca1dfb66d05499be1393db77d5988d85-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-scanditsdk-android-5.1.0_eed328481af32bc982e6dcefac876383cf062fb0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxrelay-2.0.0_4393c3dee2a0036bb461303903a604627ca5f7ec-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxjava-2.0.4_1cc002c6641b7c97b50df13a2983206117c8d3a9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit2-rxjava2-adapter-1.0.0_d99487ab33af021214285a1b3ebeace8fc761e8f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit-2.2.0_24534348a92cc8f33cc21f30be9a39060b33a646-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-reactive-streams-1.0.0_15e8605c1c67f559aa28e458b60e7898b6a18758-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-picasso-2.5.2_744a1a6af30295e0c9e724df1a526efa958509ef-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okio-1.11.0_6b723ec26b2c36ccffc759ac5b154cf36285fb29-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okhttp-3.6.0_2ef602b3bbd061559b4816f09ade04ffc34d5992-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-app-compat-1.4.5_fdf0146ace81d2fb409b0b90cecd298b2db443b3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-android-1.4.5_4533750a09e7f9561dba79046873dc29d4e063c0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-1.4.5_ae879d2498905e1821bdd3125f6001dec6a2f78e-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moshi-1.1.0_2115cb3a6738d24b7d8ea9c3ea6866b782b064b9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-logging-interceptor-3.1.2_bd769c8a7fca5733cd928c73a9d51df3e1cca06b-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.reactivex.rxjava2-rxandroid-2.0.1_7b7362975c9e1a2fd780a9ea75d3843ec22f1d1c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.card-android-sdk-5.5.0_90001f267d88790f577cdd80869bfaeaf295aada-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-gson-2.7_ac753a502a58b0f7ff8d540a82afe551bff57762-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-converter-gson-2.1.0_57f7eec7348edaf870fd767eda56e3bfbe30863c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-constraint-layout-solver-1.0.0_772160a327dd64eab9e1b9bf4584879112b8a869-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.stormpath.sdk-stormpath-sdk-android 02-26 18:42:59.875 28358-28658/com.example.noq.noq E/AndroidRuntime: -2.0_ac54960b4e664d6b3eba0672ebc4668365b2982f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.paypal.sdk-paypal-android-sdk-2.15.3_906f63da0ee53c30b5f6764bd3dcafd873a1f314-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-vision-10.0.1_52f0cb163aea49ac27b71ccf67451dc8e29408ea-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-tasks-10.0.1_f86d1460bf7cc9529ff2e7fae30b73b898ed871f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-10.0.1_d8cef71b0b116606dbe6f7639fc17f69e0b4f2a5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.google.android.gms-play-services-base-10.0.1_09fff8038baf8d21f752fe16a5062178f6e191ad-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support.constraint-constraint-layout-1.0.0_af413e7f6405b0df10c7954b0029dc9888bcd093-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-transition-25.1.0_a3840f75a2d1132cf51ddd2ee6722fdce1176391-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-vector-drawable-25.1.0_ed6db6d0ea1ab64ab4ba64412564d350a8136cf6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-v4-25.1.0_7fa19a15fb50beb0f25fb87a15ee6da09d4d4b05-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-media-compat-25.1.0_21e735725f3c9e8eecf8b3488e734d16955e9f92-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-fragment-25.1.0_ce62c4777fafea1fa3a3e66a8572a56b1b818ddf-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-core-utils-25.1.0_9b2338a7e8542b6ba4840a34278020e8d13ebb37-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-core-ui-25.1.0_06aa38440fdf176f6a53acb6ea45070df986707f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-support-compat-25.1.0_5463ae65073f2c00ba9d7c99ae87100e0141612b-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-recyclerview-v7-25.1.0_be17cf7d86913b352e81f78e24188a1fdbe60dc4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-design-25.1.0_2a67580d3170eef81162b67606052bff1260e382-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-customtabs-23.3.0_7bd090753de8c175011db4dfe5fa43aa018e9259-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-appcompat-v7-25.1.0_3ab44d8670d63507c1fe400a8a7c52c042319baf-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-25.1.0_a73ada558d288a780a7031c1ad115d8f2a2b5c73-classes.dex"],nativeLibraryDirectories=[/data/app/com.example.noq.noq-1/lib/arm64, /data/app/com.example.noq.noq-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:90) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 19 more 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: exClass=java.lang.ClassNotFoundException 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: exMsg=Didn't find class "okhttp3.internal.http.HttpEngine" on path: DexPathList[[dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-support-annotations-25.1.0_2846279fca1dfb66d05499be1393db77d5988d85-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-scanditsdk-android-5.1.0_eed328481af32bc982e6dcefac876383cf062fb0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxrelay-2.0.0_4393c3dee2a0036bb461303903a604627ca5f7ec-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-rxjava-2.0.4_1cc002c6641b7c97b50df13a2983206117c8d3a9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit2-rxjava2-adapter-1.0.0_d99487ab33af021214285a1b3ebeace8fc761e8f-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-retrofit-2.2.0_24534348a92cc8f33cc21f30be9a39060b33a646-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-reactive-streams-1.0.0_15e8605c1c67f559aa28e458b60e7898b6a18758-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-picasso-2.5.2_744a1a6af30295e0c9e724df1a526efa958509ef-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okio-1.11.0_6b723ec26b2c36ccffc759ac5b154cf36285fb29-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-okhttp-3.6.0_2ef602b3bbd061559b4816f09ade04ffc34d5992-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-app-compat-1.4.5_fdf0146ace81d2fb409b0b90cecd298b2db443b3-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-android-1.4.5_4533750a09e7f9561dba79046873dc29d4e063c0-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moxy-1.4.5_ae879d2498905e1821bdd3125f6001dec6a2f78e-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-moshi-1.1.0_2115cb3a6738d24b7d8ea9c3ea6866b782b064b9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-logging-interceptor-3.1.2_bd769c8a7fca5733cd928c73a9d51df3e1cca06b-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.reactivex.rxjava2-rxandroid-2.0.1_7b7362975c9e1a2fd780a9ea75d3843ec22f1d1c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-io.card-android-sdk-5.5.0_90001f267d88790f577cdd80869bfaeaf295aada-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-gson-2.7_ac753a502a58b0f7ff8d540a82afe551bff57762-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-converter-gson-2.1.0_57f7eec7348edaf870fd767eda56e3bfbe30863c-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-constraint-layout-solver-1.0.0_772160a327dd64eab9e1b9bf4584879112b8a869-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-com.stormpath.sdk-stormpath-sdk-android-2.0_ac54960b4e664d6b3eba0672ebc4668365b2982f-classes.dex", dex file "/dat 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: file=BaseDexClassLoader.java 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: class=dalvik.system.BaseDexClassLoader 02-26 18:42:59.880 28358-28658/com.example.noq.noq D/Error: ERR: method=findClass line=56 02-26 18:42:59.881 28358-28658/com.example.noq.noq D/Error: ERR: stack=java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/http/HttpEngine; at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:219) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:129) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.http.HttpEngine" on path: DexPathList[[dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-support-annotations-25.1.0_2846279fca1dfb66d05499be1393db77d5988d85-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.noq.noq/files/instant-r
The Solution I came up with I found here: http://stackoverflow.com/questions/31402447/dont-use-later-library-version-from-transitive-dependency-in-gradle
So I added this in my build.gradle for the Project:
allprojects { configurations.all { resolutionStrategy.force 'com.squareup.okhttp3:okhttp:3.1.2' } repositories { jcenter() } }
This seems to work, however I have no idea if this affects Retrofit or the other libraries I use so I don't know if this is a good workaround. Does anybody know a better solution?