title: "Cannot resolve method 'fromJson'
body: <p>I was trying to read the information of a Json file but there is an error that say me:</p>
  
  <pre><code>Cannot resolve method 'fromJson(android.util.JsonReader, java.lang.Class&lt;com.proyecto.matriculas.model.Matricula&gt;)'
  </code></pre>
  
  <p>I have other classes where i get the information of the file and where i did the conexion with the server, in which is the json file , and the only problem is here, in this class.</p>
  
  <p><strong>The class where i try it is:</strong></p>
  
  <pre><code>public class GsonMatriculaParser {
      public List leerFlujoJson(InputStream in) throws IOException {
          Gson gson = new Gson();
          JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8"));
          List&lt;Matricula&gt; matriculas = new ArrayList&lt;&gt;();
  
          reader.beginArray();
  
          while (reader.hasNext()) {
              Matricula matricula = (Matricula) gson.fromJson(reader, Matricula.class);
              matriculas.add(matricula);
          }
  
  
          reader.endArray();
          reader.close();
          return matriculas;
      }
  }
  </code></pre>
  
  <p><strong>And the error is in</strong>   <code>gson.fromJson(reader, Matricula.class);</code> </p>
  
  <p>I'm using <code>implementation 'com.google.code.gson:gson:2.8.5'</code> as my <code>gson</code> depencency in my <code>build.gradle</code>.</p>
  
  <p><strong>Class Matricula:</strong></p>
  
  <pre><code>public class Matricula {
  
  private Integer N_Registro;
      private String Infraccion;
      private String Fecha_Infraccion;
      private String N_Matricula;
      private Integer IDPropietariosFK;
  
  
      public Matricula(Integer N_Registro,  String Infraccion, String Fecha_Infraccion, String N_Matricula, Integer IDPropietariosFK) {
          this.N_Registro = N_Registro;
          this.Infraccion = Infraccion;
          this.Fecha_Infraccion = Fecha_Infraccion;
          this.N_Matricula = N_Matricula;
          this.IDPropietariosFK = IDPropietariosFK;
      }
  
      public Integer getN_Registro() {
          return N_Registro;
      }
  
      public void setN_Registro(Integer N_Registro) {
          this.N_Registro = N_Registro;
      }
  
      public String getInfraccion() {
          return Infraccion;
      }
  
      public void setInfraccion(String Infraccion) {
          this.Infraccion = Infraccion;
      }
  
      public String getFecha_Infraccion() {
          return Fecha_Infraccion;
      }
  
      public void setFecha_Infraccion(String Fecha_Infraccion) { this.Fecha_Infraccion = Fecha_Infraccion; }
  
      public String getN_Matricula() {
          return N_Matricula;
      }
  
      public void setN_Matricula(String N_Matricula) {
          this.N_Matricula = N_Matricula;
      }
  
      public Integer getIDPropietariosFK() {
          return IDPropietariosFK;
      }
  
      public void setIDPropietariosFK(Integer IDPropietariosFK) { this.IDPropietariosFK = IDPropietariosFK; }
  
  }
  </code></pre>
  
  <p>I don't know if the problem is with the dependecy or the problem is in the code in one of my classes...</p>