2.0.0-SNAPSHOT
Entering RealmConfiguration.java Android Studio says Library Source Code does not match the bytecode for class RealmConfiguration.
In this file:
public static final class Builder {
....
public Builder(Context context) {
Entering RealmConfiguration.class:
public static final class Builder {
....
Builder(Context context) {
In RealmConfiguration.java it's public
In RealmConfiguration.class it's internal
so new RealmConfiguration.Builder(this) does not compile with
Builder(android.content.Context) is not public...
RealmConfiguration.Builder working
Expected Results
RealmConfiguration.Builder should be public
Actual Results
Error:(16, 49) error: Builder(Context) is not public in Builder; cannot be accessed from outside package
Steps & Code to Reproduce
Describe your current debugging efforts.
Code Sample
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder(this)
.name(Realm.DEFAULT_REALM_NAME)
.schemaVersion(0)
.deleteRealmIfMigrationNeeded()
.build();
Realm version(s): 2.0.0-SNAPSHOT
Android Studio version: 2.2
Which Android version and device: Nexus 10
You should clean/rebuild and there was a breaking change, the new RealmConfiguration.Builder(Context)
constructor was removed, now you need to call Realm.init(Context)
from somewhere (application or first activity or something of that sort), and then the configuration hasnew RealmConfiguration.Builder()
Most helpful comment
You should clean/rebuild and there was a breaking change, the
new RealmConfiguration.Builder(Context)
constructor was removed, now you need to callRealm.init(Context)
from somewhere (application or first activity or something of that sort), and then the configuration hasnew RealmConfiguration.Builder()