I have a problem with Retrofit on my emulator running Android 4.3 and my device is on Android 4.4.2 while the same code runs normally on another emulator with Android 7.1.1<
Android prior to 21 has some missing SSL and Retrofit wont work. Using google services you can update the device protocols after that the HTTP request will work
//compile 'com.google.android.gms:play-services-base:11.0.0'
//remember to add the library in your dependencies
//compile 'com.google.android.gms:play-services-base:$currentVersion'
ProviderInstaller.installIfNeededAsync(this, new ProviderInstallListener() {
@Override
public void onProviderInstalled() {
//Do your http request here
}
@Override
public void onProviderInstallFailed(int errorCode, Intent recoveryIntent) {
//sad face :C is sad
}
});