title: Can't Resolve fromJson
body: <p>I've looked over <a href="https://stackoverflow.com/questions/17453406/gson-with-mixed-read">this thread</a> and <a href="https://stackoverflow.com/questions/32319222/cannot-resolve-method-fromjsonorg-json-jsonobject-java-lang-classme-myrotten">this thread</a> all trying to get android studio to recognize the <code>fromJson</code> method with no luck. I have <code>com.google.code.gson:gson:2.6.2</code> as my <code>gson</code> dependency in my project structure. So, far all I've tried will still not allow this line to compile: </p>
  
  <pre><code>LookupRate cuRate = gson.fromJson(gson, LookupRate.class);
  </code></pre>
  
  <p>I've tried the following imports with no luck making my best effort to clean my project each time just for some kind of refresh. Imports:</p>
  
  <pre><code>import java.lang.reflect.Type;
  import com.google.gson.JsonObject;
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.google.gson.stream.JsonReader;
  import com.google.gson.reflect.TypeToken;
  </code></pre>
  
  <p>Should I be trying something else? I look over at what each of the two parameters should be dependent upon in <a href="http://google-gson.googlecode.com/svn/tags/1.1.1/docs/javadocs/com/google/gson/Gson.html" rel="nofollow noreferrer">google's documentation</a>.  </p>
  
  <p>Here is some context for the gson variable as I realized it was late at night when I named some of this stuff. In the <code>doInBackground()</code> method I declared a variable <code>gSB</code> like so: </p>
  
  <pre><code>StringBuilder gSB = new StringBuilder();
  </code></pre>
  
  <p>inside of a <code>try</code> statement it assigned like so: </p>
  
  <pre><code>connectStat = (HttpURLConnection) params[0].openConnection();
  InputStream inputer = new BufferedInputStream(connectStat.getInputStream());
  scanner = new Scanner(inputer);
  while (scanner.hasNext()) gSB.append(scanner.nextLine());
  Log.v(checkRSP, "Response(" + connectStat.getResponseCode() + "):" +
                  connectStat.getResponseMessage());
  </code></pre>
  
  <p>All exceptions are handled properly then after my <code>try</code>,<code>catch</code>,<code>finally</code>. The variable <code>gson</code> is assigned like so:</p>
  
  <pre><code>String gson = gSB.toString();
  </code></pre>
  
  <p>Then the line where <code>fromJson</code> cannot be resolved comes next, but I will repeat it to remove any confusion my amateur description may have caused:</p>
  
  <pre><code>LookupRate cuRate = gson.fromJson(gson, LookupRate.class);
  </code></pre>