title: impossible to import android.content.res.Resources
body: <p>I can't find how to <code>import android.content.res.Resources;</code>
  Here is my code:</p>
  
  <pre><code>package com.mycompany.fortune;
  
  import com.google.gson.JsonObject;
  import retrofit.Callback;
  import retrofit.RestAdapter;
  import retrofit.RetrofitError;
  import retrofit.client.Response;
  import android.content.res.Resources; //This don't work
  import retrofit.http.GET;
  import java.util.List;
  import java.util.Random;
  
  public class FortuneClient {
      private static final String API_URL = "http://www.myurl.fr";
  
      private interface FortuneService {
          @GET("/test.php")
          void getFortune(Callback&lt;JsonObject&gt; callback);
      }
  
      public static class OnFortuneListener {
          public void onFortune(String fortune) {
          }
      }
  
      private static Random rng = new Random();
  
      private FortuneService service;
  
      public FortuneClient() {
          RestAdapter adapter = new RestAdapter.Builder()
                  .setEndpoint(API_URL)
                  .build();
  
          service = adapter.create(FortuneService.class);
      }
  
      public void getFortune(final OnFortuneListener listener) {
          service.getFortune(new Callback&lt;JsonObject&gt;() {
              @Override
              public void success(JsonObject json, Response response) {
                  String test = json.getAsJsonObject("0").getAsJsonObject("title").toString();
                  String test2 = json.getAsJsonObject("0").getString('title');
                  listener.onFortune(test2);
              }
  
              @Override
              public void failure(RetrofitError error) {
                  listener.onFortune(error.toString());
              }
          });
      }
  }
  </code></pre>
  
  <p><strong>the error is</strong>: "Error:(8, 26) Gradle: error: package android.content.res does not exist"</p>
  
  <p><strong>What I tried:</strong></p>
  
  <p>-Make, remake, build, clean, rebuild,</p>
  
  <p>-Invalidate cache and restart,</p>
  
  <p>-Verify the java/sdk/jdk positions,</p>
  
  <p>-Stupid things on the gradle/xml files.</p>