title: Android ObjectBox.getAll() returning null, even though objectBox.count is 5
body: <p>I do not understand why the for loop is breaking my application. I understand that this is a simple question, but I have been staring at this code for hours attempting to figure it out. I am fairly certain all of the dependencies in the build.gradle are correct. Let me know if you need more information. Thank you. </p>
  
  <p>// App Class</p>
  
  <pre><code>package edu.uncw.seahawktours;
  
  import android.app.Application;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import io.objectbox.Box;
  import io.objectbox.BoxStore;
  
  public class App extends Application {
  
  private BoxStore boxStore;
  
  @Override
  public void onCreate() {
      super.onCreate();
  
      // Initialize the main data access object
      boxStore = MyObjectBox.builder().androidContext(App.this).build();
  
      // Get the wrapper (Box) for the Book table that lets us store Book objects
      Box&lt;Building&gt; buildingBox = boxStore.boxFor(Building.class);
  
      // Initialize with some data
      if (buildingBox.count() == 0) {
          List&lt;Building&gt; initialBooks = new ArrayList&lt;&gt;();
          initialBooks.add(new Building("CIS", "https://library.uncw.edu/web/collections/archives/bnl/cis.html", R.drawable.cis));
          initialBooks.add(new Building("Depaolo Hall", "https://library.uncw.edu/web/collections/archives/bnl/6.html", R.drawable.depaolo));
          initialBooks.add(new Building("Trask Coliseum", "https://library.uncw.edu/web/collections/archives/bnl/10.html", R.drawable.trask));
          initialBooks.add(new Building("King Hall", "https://library.uncw.edu/web/collections/archives/bnl/4.html", R.drawable.kinghall2));
          initialBooks.add(new Building("Leutze Hall", "https://library.uncw.edu/web/collections/archives/bnl/17.html", R.drawable.leutzehall));
  
          // ObjectBox is smart enough to handle CRUD on Collections of entities
          buildingBox.put(initialBooks);
      }
  
      System.out.println(buildingBox.count());
  
      for (Building book : buildingBox.getAll()) {
          System.out.println(book.getBuildingName());
      }
  
  }
  
  public BoxStore getBoxStore() {
      return boxStore;
      }
  }
  </code></pre>
  
  <p>// Building Class</p>
  
  <pre><code>package edu.uncw.seahawktours;
  
  import io.objectbox.annotation.Entity;
  import io.objectbox.annotation.Id;
  
  @Entity
  public class Building {
      @Id public long id;
      private String buildingName;
      private String description;
      private String url;
      private int imageID;
  
  
  public Building(String name, String url ,int buildingPictureID){
      this.buildingName = name;
      this.url = url;
      this.imageID = buildingPictureID;
  }
  
  public long getId() {
      return id;
  }
  
  public String getDescription() {
      return description;
  }
  
  public String getBuildingName() {
      return buildingName;
  }
  
  public String getUrl() {
      return url;
  }
  
  public int getImageID() {
      return imageID;
  }
  
  public void setId(long id) {
      this.id = id;
  }
  
  public void setBuildingName(String buildingName) {
      this.buildingName = buildingName;
  }
  
  public void setDescription(String description) {
      this.description = description;
  }
  
  public void setUrl(String url) {
      this.url = url;
  }
  
  public void setImageID(int imageID) {
      this.imageID = imageID;
  }
  
  @Override
  public String toString() {
      return this.buildingName;
      }
  }
  </code></pre>
  
  <p>// Project Build.Gradle</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to 
  all sub-projects/modules.
  
  buildscript {
      ext.objectboxVersion = '2.2.0'
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.2.0'
          classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
  
  
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>// App Build.Gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'io.objectbox'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "edu.uncw.seahawktours"
          minSdkVersion 19
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.android.support:design:28.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support:recyclerview-v7:28.0.0'
      implementation 'com.android.support:cardview-v7:28.0.0'
  }
  </code></pre>