Код: Выделить всё
public class ApiClient {
public static final String BASE_URL = "https://example.com/";
private static Retrofit retrofit = null;
public static Retrofit getClient() {
if (retrofit==null) {
retrofit = new Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
}
ОШИБКА: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Доверительная привязка для пути сертификации не найден.
Подробнее здесь: https://stackoverflow.com/questions/376 ... it-library