title: Using an Emulator ip Address 10.0.2.2 in Retrofit baseUrl
body: <p>This is my method am trying to connect to my local server but it brings an error , am using An emulator IP Addresss</p>
  
  <p><strong>Error:(85, 17) error: cannot access HttpUrl
  class file for okhttp3.HttpUrl not found</strong></p>
  
  <pre><code> private void loadJSON(){
              Retrofit retrofit = new Retrofit.Builder()
                      .baseUrl("http://10.0.2.2")
                      .addConverterFactory(GsonConverterFactory.create())
                      .build();
              RequestInterface request = retrofit.create(RequestInterface.class);
              Call&lt;JSONResponse&gt; call = request.getJSON();
  
              call.enqueue(new Callback&lt;JSONResponse&gt;() {
                  @Override
                  public void onResponse(Call&lt;JSONResponse&gt; call, retrofit2.Response&lt;JSONResponse&gt; response) {
                      JSONResponse jsonResponse = response.body();
                      flowerList = new ArrayList&lt;&gt;(Arrays.asList(jsonResponse.getNews()));
                      adapter = new NewsAdapter2(MainActivity.this,flowerList);
                      mRecycler.setAdapter(adapter);
                  }
  
                  @Override
                  public void onFailure(Call&lt;JSONResponse&gt; call, Throwable throwable) {
                      Log.d("Error",throwable.getMessage());
                  }
              });
  
  
          }
  </code></pre>
  
  <p>Below is my Interface which shows the continuation of the Url</p>
  
  <pre><code>package oerrride.we.huzykamz.newsfeed;
  
  import retrofit2.Call;
  import retrofit2.http.GET;
  import retrofit2.Call;
  import retrofit2.http.GET;
  /**
   * Created by HUZY_KAMZ on 9/13/2016.
   */
  public interface RequestInterface {
      @GET("UgandaMedicalAccess/HealthCentreNews/fecth.php")
      Call&lt;JSONResponse&gt; getJSON();
  
  }
  </code></pre>