728x90
반응형

이 글은 Realm을 사용하며 Java8을 사용하기 위해 jackOption을 설정한 개발자를 위한 글이다.


Realm을 추가하고 앱을 실행하면 Application에서 Realm.init()부터 에러가 나는것을 볼 수 있다.


java.lang.ExceptionInInitializerError: RealmTransformer doesn't seem to be applied.

                                           Please update the project configuration to use the Realm Gradle plugin.

   See https://realm.io/news/android-installation-change/

at io.realm.RealmConfiguration.<clinit>(RealmConfiguration.java:78)

at io.realm.RealmConfiguration$Builder.initializeBuilder(RealmConfiguration.java:474)

at io.realm.RealmConfiguration$Builder.<init>(RealmConfiguration.java:460)

at io.realm.Realm.init(Realm.java:201)


만약 저 링크에 있는 것처럼 Gradle 설정을 잘 따라 했다면 JackOption을 사용했는지 확인해봐야 한다.


만약 본인이 Lambda을 사용하기 위해 아래와 같이 JackOption을 사용했다면

Retrolambda를 사용해야 Realm을 사용 할 수 있다.


이 에러를 해결하기 위해서는 jackOptions을 제거하고 Retrolambda를 추가해야한다.


본인 프로젝트 build.gradle




Module build.gradle




출처

https://blog.realm.io/android-installation-change/

https://stackoverflow.com/questions/41153879/realm-android-realmtransformer-doesnt-seem-to-be-applied

https://github.com/evant/gradle-retrolambda

http://tiii.tistory.com/5

728x90
반응형

+ Recent posts