First time using httpOk and retrofit. I'm using the code of another employee, but can't make it work, even after going into internet to check what is the potential error.
public static Retrofit getBsfBuilder() {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();
retrofit = new Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.client(client)
.build();
return retrofit;
}
With the declaration of the BASE_URL above, and the retrofit to null.
The error is
E/AndroidRuntime: FATAL EXCEPTION: main Process: , PID: 5305 java.lang.ExceptionInInitializerError