title: "No setter/field for field found on class"
body: <p>I'm creating an app in Android Studio, which connects to a Cloud Firestore database. In the database I have the following structure:</p>
  
  <pre><code>Myclass
    - name = "test"
    - subclass
       - 0 = "String 1"
       - 1 = "String 2"
  </code></pre>
  
  <p>The class itself is declared like this (irrelevant bits removed):</p>
  
  <pre><code>public class Myclass {
  
      private String name;
      private String[] subclass;
  
      // CONSTRUCTOR
      public Chart() {}
  
      //GETTERS
      public String getName()     { return this.name; }
  
      // SETTERS
      public void setSubclass(String[] thisSubclass)    { this.subclass = thisSubclass; }
  
  }
  </code></pre>
  
  <p>In the activity, the Myclass object is set up like this (again, irrelevant bits removed):</p>
  
  <pre><code>public class MyclassActivity  {
      DocumentReference docRef;
      Myclass myItem;
  
      @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
  
         // Set up database connection, read in itemId etc...
         // ...omitted for clarity...    
  
          docRef = databaseRef.collection("myclass").document(itemId);
          docRef.get().addOnCompleteListener(new OnCompleteListener&lt;DocumentSnapshot&gt;() {
              @Override
              public void onComplete(@NonNull Task&lt;DocumentSnapshot&gt; task) {
                  if (task.isSuccessful()) {
                      DocumentSnapshot document = task.getResult();
                      if (document.exists()) {
                          myItem = document.toObject(Myclass.class);
                      }
                  }
           }
  }
  </code></pre>
  
  <p>This reads in the Myclass object, with the name set correctly, but the subclass object doesn't get set up - it's still null.</p>
  
  <p>In the debug console there's the following message:</p>
  
  <pre><code>No setter/field for subclass found on class path.to.app.Myclass
  </code></pre>
  
  <p>The 'setSubclass' function is greyed out, as if it's never used. I'm sure the problem is something obvious, but I can't see it.</p>