RealmConfiguration.Builder.AnlowWritesOnuithread (verdadero)
RealmConfiguration config = new RealmConfiguration.Builder(getApplicationContext()).deleteRealmIfMigrationNeeded().build();
Realm.setDefaultConfiguration(config);
android developer