Recently I analyzed crash reports form my app and found several stack traces which points to okhttp
My app doesn't depend on okhttp explicitly.
AFAIK okhttp version depends on Android OS version, and okhttp library by itself placed on device
To help with troubleshooting I decided to log okhttp library version, and looks like I found several useful classes for this
Just to make sure that I didn't mistake I took com.android.okhttp.internal.http.HttpURLConnectionImpl class form stack-trace and tried to Class.forName it - success
Also I noticed that com.squareup.okhttp transformed to com.android.okhttp looks like at build-time, so totally I tried such variants
Class.forName("com.android.okhttp.internal.Version")->java.lang.ClassNotFoundExceptionClass.forName("com.squareup.okhttp.internal.Version")->java.lang.ClassNotFoundExceptionClass.forName("okhttp3.internal.Version")->java.lang.ClassNotFoundExceptionClass.forName("com.android.okhttp.internal.http.HttpURLConnectionImpl")-> success
Can anyone explain why? What I missed?
Update
I have pulled okhttp.jar from my device adb pull /system/framework/okhttp.jar but it contains MANIFEST.MF only