title: Realm error "transformClassesWithRealmTransformerForDebug" failed to resolve types
body: <p>I'm using Realm on my android app, but I've got a strange error that is:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:transformClassesWithRealmTransformerForDebug'.
    javassist.CannotCompileException: setValues (Ljava/lang/String;)V in it.finproductions.discogsmanager.Structures.Collection: failed to resolve types</p>
  </blockquote>
  
  <p>My Collection class is this:</p>
  
  <pre><code>public class Collection extends RealmObject {
  
  private int Discogsid;
  private int Folder;
  //    String json;
  private boolean Checked = false;
  private String Artist;
  private String Title;
  private int Year;
  private int Instanceid;
  private String Format;
  private String Cat;
  private String Thumb;
  //    DateTime dateadded;
  private long Timestamp;
  
  private String Tostringsearch;
  
  private RealmList&lt;Artists&gt; Artists = new RealmList&lt;&gt;();
  private RealmList&lt;Formats&gt; Formats = new RealmList&lt;&gt;();
  private RealmList&lt;Labels&gt; Labels = new RealmList&lt;&gt;();
  
  private boolean Values = false;
  private boolean ToStringSearch = false;
  
  public Collection() {
  }
  
  public Collection(int discogsid, int folder, String json) {
      this.Discogsid = discogsid;
      this.Folder = folder;
  //        this.json = json;
      setValues(json);
  }
  
  public void setValues(String json) {
      JSONObject row;
  
      try {
          row = new JSONObject(json);
          try {
              ArrayList&lt;String&gt; artisti = new ArrayList&lt;&gt;();
              for (ArtistTrack a : Utils.getArtistsFromTrack(row.getJSONObject("basic_information")))
                  artisti.add(a.getName());
              Artist = TextUtils.join(", ", artisti);
  
              JSONArray elencoArtisti = row.getJSONObject("basic_information").getJSONArray("artists");
              for (int i = 0; i &lt; elencoArtisti.length(); i++) {
                  Artists.add(new Artists(
                          Utils.takeJsonString(elencoArtisti.getJSONObject(i), "join"),
                          Utils.takeJsonString(elencoArtisti.getJSONObject(i), "name"),
                          Utils.takeJsonString(elencoArtisti.getJSONObject(i), "anv"),
                          Utils.takeJsonString(elencoArtisti.getJSONObject(i), "tracks"),
                          Utils.takeJsonString(elencoArtisti.getJSONObject(i), "role"),
                          Utils.takeJsonString(elencoArtisti.getJSONObject(i), "resource_url"),
                          Utils.takeJsonInt(elencoArtisti.getJSONObject(i), "join")
                  ));
              }
  
          } catch (Exception e) {
              Artist = "";
          }
  
          try {
              Title = row.getJSONObject("basic_information").getString("title");
          } catch (Exception e) {
              Title = "";
          }
  
          try {
              Year = row.getJSONObject("basic_information").getInt("year");
          } catch (Exception e) {
              Year = 0;
          }
  
          try {
              Instanceid = row.getInt("instance_id");
          } catch (Exception e) {
              Instanceid = 0;
          }
  
          try {
              Format = TextUtils.join(Utils.DIVISORFORLISTINDB, Utils.iterateEveryValueInArrayListForFormat(row.getJSONObject("basic_information"), "formats"));
  
              JSONArray elencoFormats = row.getJSONObject("basic_information").getJSONArray("formats");
              for (int i = 0; i &lt; elencoFormats.length(); i++) {
                  RealmList&lt;Descriptions&gt; descrizione = new RealmList&lt;&gt;();
                  for (int ii = 0; ii &lt; elencoFormats.getJSONObject(i).getJSONArray("descriptions").length(); ii++) {
                      descrizione.add(new Descriptions(elencoFormats.getJSONObject(i).getJSONArray("descriptions").getString(ii)));
                  }
  
                  Formats.add(new Formats(
                          Utils.takeJsonString(elencoFormats.getJSONObject(i), "name"),
                          Utils.takeJsonString(elencoFormats.getJSONObject(i), "qty"),
                          descrizione
                  ));
              }
          } catch (Exception e) {
              Format = "";
          }
  
          try {
              Cat = TextUtils.join(Utils.DIVISORFORLISTINDB, Utils.iterateEveryValueInArrayListForLabel(row.getJSONObject("basic_information"), "labels"));
  
              JSONArray elencoLabels = row.getJSONObject("basic_information").getJSONArray("artists");
              for (int i = 0; i &lt; elencoLabels.length(); i++) {
                  Labels.add(new Labels(
                          Utils.takeJsonString(elencoLabels.getJSONObject(i), "name"),
                          Utils.takeJsonString(elencoLabels.getJSONObject(i), "entity_type"),
                          Utils.takeJsonString(elencoLabels.getJSONObject(i), "catno"),
                          Utils.takeJsonString(elencoLabels.getJSONObject(i), "resource_url"),
                          Utils.takeJsonInt(elencoLabels.getJSONObject(i), "id"),
                          Utils.takeJsonString(elencoLabels.getJSONObject(i), "entity_type_name")
                  ));
              }
  
          } catch (Exception e) {
              System.out.println("NO CAT");
              Cat = "";
          }
  
          try {
              Thumb = row.getJSONObject("basic_information").getString("thumb");
              if (Thumb.equals("")) {
                  Thumb = Utils.DEFAULT_RELEASE;
              }
          } catch (Exception e) {
              Thumb = Utils.DEFAULT_RELEASE;
          }
  
          try {
              DateTimeFormatter formatter = DateTimeFormat.forPattern("YYYY-MM-DDThh:mm:ssTZD");
              Timestamp = new Timestamp(formatter.parseDateTime(row.getString("date_added")).getMillis()).getTime();
          } catch (Exception e) {
          }
  
          Tostringsearch = getArtist() + " " + getTitle() + " " + TextUtils.join(" ", getFormat()) + " " + TextUtils.join(" ", getCat()) + " " + getYear();
          Tostringsearch = Tostringsearch.toLowerCase();
      } catch (Exception e) {
      }    }
  
  public boolean isToStringSearch() {
      return ToStringSearch;
  }
  
  public void setToStringSearch(boolean toStringSearch) {
      ToStringSearch = toStringSearch;
  }
  
  public int getDiscogsid() {
      return Discogsid;
  }
  
  public void setDiscogsid(int discogsid) {
      Discogsid = discogsid;
  }
  
  public int getFolder() {
      return Folder;
  }
  
  public void setFolder(int folder) {
      Folder = folder;
  }
  
  public String getArtist() {
      return Artist;
  }
  
  public void setArtist(String artist) {
      Artist = artist;
  }
  
  public String getTitle() {
      return Title;
  }
  
  public void setTitle(String title) {
      Title = title;
  }
  
  public int getYear() {
      return Year;
  }
  
  public void setYear(int year) {
      Year = year;
  }
  
  public int getInstanceid() {
      return Instanceid;
  }
  
  public void setInstanceid(int instanceid) {
      Instanceid = instanceid;
  }
  
  public void setFormat(String format) {
      Format = format;
  }
  
  public void setCat(String cat) {
      Cat = cat;
  }
  
  public String getThumb() {
      return Thumb;
  }
  
  public void setThumb(String thumb) {
      Thumb = thumb;
  }
  
  public void setTimestamp(long timestamp) {
      Timestamp = timestamp;
  }
  
  public String getTostringsearch() {
      return Tostringsearch;
  }
  
  public void setTostringsearch(String tostringsearch) {
      Tostringsearch = tostringsearch;
  }
  
  public RealmList&lt;it.finproductions.discogsmanager.Structures.Artists&gt; getArtists() {
      return Artists;
  }
  
  public void setArtists(RealmList&lt;it.finproductions.discogsmanager.Structures.Artists&gt; artists) {
      Artists = artists;
  }
  
  public RealmList&lt;it.finproductions.discogsmanager.Structures.Formats&gt; getFormats() {
      return Formats;
  }
  
  public void setFormats(RealmList&lt;it.finproductions.discogsmanager.Structures.Formats&gt; formats) {
      Formats = formats;
  }
  
  public RealmList&lt;it.finproductions.discogsmanager.Structures.Labels&gt; getLabels() {
      return Labels;
  }
  
  public void setLabels(RealmList&lt;it.finproductions.discogsmanager.Structures.Labels&gt; labels) {
      Labels = labels;
  }
  
  public boolean isValues() {
      return Values;
  }
  
  public void setValues(boolean values) {
      Values = values;
  }
  
  public List&lt;String&gt; getFormat() {
  //        return format;
      return new ArrayList&lt;&gt;(Arrays.asList(Format.split(Utils.DIVISORFORLISTINDB)));
  }
  
  public List&lt;String&gt; getCat() {
  //        return cat;
      return new ArrayList&lt;&gt;(Arrays.asList(Cat.split(Utils.DIVISORFORLISTINDB)));
  }
  
  public Date getTimestamp() {
      return new Date(Timestamp);
  }
  
  //    public String toStringExpectJson() {
  //        return "TSEJ: " + Discogsid + ", " + Folder + ", " + getArtist() + ", " + getTitle() + ", " + getYear() + getInstanceid();
  //    }
  
  public String getToStringSearch() {
      return getArtist() + " " + getTitle() + " " + getFormat() + " " + getCat() + " " + getYear();
  }
  
  public void setChecked(boolean set) {
      Checked = set;
  }
  
  public boolean getChecked() {
      return Checked;
  }
  
  }
  </code></pre>
  
  <p>Artists, Formats and Labels are other classes that extends RealmObject.</p>
  
  <p>I've tried to rebuid project, but nothing changes...</p>
  
  <p>My Project build is:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.0-alpha5'
          classpath "io.realm:realm-gradle-plugin:0.88.3"
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>and my app app gradle starts with</p>
  
  <pre><code>apply plugin: 'android'
  apply plugin: 'realm-android'
  </code></pre>
  
  <p>Someone can figure out what's the problem?</p>
  
  <p>Edit 1:
  Added entire setValues() method.</p>
  
  <p>Edit 2:
  Other called methods are:</p>
  
  <pre><code>public class Artists extends RealmObject {
  
      private String join;
      private String name;
      private String anv;
      private String tracks;
      private String role;
      private String resource_url;
      private int id;
  
      public Artists() {
      }
  
      public Artists(String join, String name, String anv, String tracks, String role, String resource_url, int id) {
          this.join = join;
          this.name = name;
          this.anv = anv;
          this.tracks = tracks;
          this.role = role;
          this.resource_url = resource_url;
          this.id = id;
      }
  
      public String getJoin() {
          return join;
      }
  
      public void setJoin(String join) {
          this.join = join;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getAnv() {
          return anv;
      }
  
      public void setAnv(String anv) {
          this.anv = anv;
      }
  
      public String getTracks() {
          return tracks;
      }
  
      public void setTracks(String tracks) {
          this.tracks = tracks;
      }
  
      public String getRole() {
          return role;
      }
  
      public void setRole(String role) {
          this.role = role;
      }
  
      public String getResource_url() {
          return resource_url;
      }
  
      public void setResource_url(String resource_url) {
          this.resource_url = resource_url;
      }
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  }
  
  
  public class Artists extends RealmObject {
  
      private String join;
      private String name;
      private String anv;
      private String tracks;
      private String role;
      private String resource_url;
      private int id;
  
      public Artists() {
      }
  
      public Artists(String join, String name, String anv, String tracks, String role, String resource_url, int id) {
          this.join = join;
          this.name = name;
          this.anv = anv;
          this.tracks = tracks;
          this.role = role;
          this.resource_url = resource_url;
          this.id = id;
      }
  
      public String getJoin() {
          return join;
      }
  
      public void setJoin(String join) {
          this.join = join;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getAnv() {
          return anv;
      }
  
      public void setAnv(String anv) {
          this.anv = anv;
      }
  
      public String getTracks() {
          return tracks;
      }
  
      public void setTracks(String tracks) {
          this.tracks = tracks;
      }
  
      public String getRole() {
          return role;
      }
  
      public void setRole(String role) {
          this.role = role;
      }
  
      public String getResource_url() {
          return resource_url;
      }
  
      public void setResource_url(String resource_url) {
          this.resource_url = resource_url;
      }
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  }
  
  public class Labels extends RealmObject {
  
      private String name;
      private String entity_type;
      private String catno;
      private String resource_url;
      private int id;
      private String entity_type_name;
  
      public Labels() {
      }
  
      public Labels(String name, String entity_type, String catno, String resource_url, int id, String entity_type_name) {
          this.name = name;
          this.entity_type = entity_type;
          this.catno = catno;
          this.resource_url = resource_url;
          this.id = id;
          this.entity_type_name = entity_type_name;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getEntity_type() {
          return entity_type;
      }
  
      public void setEntity_type(String entity_type) {
          this.entity_type = entity_type;
      }
  
      public String getCatno() {
          return catno;
      }
  
      public void setCatno(String catno) {
          this.catno = catno;
      }
  
      public String getResource_url() {
          return resource_url;
      }
  
      public void setResource_url(String resource_url) {
          this.resource_url = resource_url;
      }
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getEntity_type_name() {
          return entity_type_name;
      }
  
      public void setEntity_type_name(String entity_type_name) {
          this.entity_type_name = entity_type_name;
      }
  }
  </code></pre>