realm-java: App crashing 4.X devices. java.lang.NoClassDefFoundError: io.realm.internal.RealmCore

App crashing while initializing Realm configuration. Getting the error

05-19 10:12:49.810 10049-10067/? E/AndroidRuntime: FATAL EXCEPTION: Thread-341 Process: PID: 10049 java.lang.NoClassDefFoundError: io.realm.internal.RealmCore at io.realm.RealmConfiguration$Builder.<init>(RealmConfiguration.java:352)

I’m using realm version io.realm:realm-gradle-plugin:0.90.1

and build tools version buildToolsVersion '23.0.3'

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 41 (16 by maintainers)

Most upvoted comments

Hi @leoouc

To confirm that it’s an issue of multides, Would you try following configuration?

  • create following file named multi-dex-keep.txt in the same directory as the proguard-rules.pro
-keep public class io.realm.internal.RealmCore  {
 *;
}
  • add following line to build.gradle right after multiDexEnabled true
multiDexKeepProguard file('multi-dex-keep.txt')

thanks @Zhuinden fixed my project issue is related to alpha version of build gradle