Android Realm version upgrade error with gradle -
we developing android application sdk. sdk module app. using realm in sdk (for now). gradle file i've added realm sdk build.gradle file. i've added apply plugin: 'realm-android' on top of file ,
buildscript { repositories { jcenter() } dependencies { classpath "io.realm:realm-gradle-plugin:0.90.1" } } on bottom of file. compiling , working correctly until tried upgrade latest version (1.1.0).
if change version 1.0.0 or later, doesn't compile. here error logs: gradle console:
note: processing class transactionupdateapicall note: processing class address note: creating defaultrealmmodule persistentdatamanager.java:134: error: no suitable method found findallsorted(string,sort,string,sort,string,sort) objects = query.findallsorted(sorts.get(0).fieldname,sorts.get(0).dir,sorts.get(1).fieldname,sorts.get(1).dir,sorts.get(2).fieldname,sorts.get(2).dir); ^ method realmquery.findallsorted(string,sort) not applicable (actual , formal argument lists differ in length) method realmquery.findallsorted(string) not applicable (actual , formal argument lists differ in length) method realmquery.findallsorted(string[],sort[]) not applicable (actual , formal argument lists differ in length) method realmquery.findallsorted(string,sort,string,sort) not applicable (actual , formal argument lists differ in length) note: input files use unchecked or unsafe operations. note: recompile -xlint:unchecked details. the messages window displays error messages gradle build:
error:(134, 32) error: no suitable method found findallsorted(string,sort,string,sort,string,sort) method realmquery.findallsorted(string,sort) not applicable (actual , formal argument lists differ in length) method realmquery.findallsorted(string) not applicable (actual , formal argument lists differ in length) method realmquery.findallsorted(string[],sort[]) not applicable (actual , formal argument lists differ in length) method realmquery.findallsorted(string,sort,string,sort) not applicable (actual , formal argument lists differ in length) error:execution failed task ':sdk:compilereleasejavawithjavac'. > compilation failed; see compiler error output details.* if create sample app , add realm (last version) app gradle build file, works. issue realm used sdk module.
if had similar issues , resolved them, or have idea wrong, please share it. appreciated.
thanks in advance.
edit:
the fix had comment used deprecated methods, , compile. compiler showing realm objects missing. once deprecated methods commented out, build succeeded.
- 0.90.0
deprecated
realm.allobjects*(). use realm.where(clazz).findall*() instead.
realm.distinct*(). use realm.where(clazz).distinct*() instead.
dynamicrealm.allobjects*(). use dynamicrealm.where(classname).findall*() instead.
dynamicrealm.distinct*(). use dynamicrealm.where(classname).distinct*() instead.
realm.allobjectssorted(field, sort, field, sort, field, sort). use realmquery.findallsorted(field[], sort[]) instead.
realmquery.findallsorted(field, sort, field, sort, field, sort). userealmquery.findallsorted(field[], sort[])instead.
realmquery.findallsortedasync(field, sort, field, sort, field, sort). use realmquery.findallsortedasync(field[], sort[]) instead.
realmconfiguration.setmodules(). use realmconfiguration.modules() instead.
realm.refresh() , dynamicrealm.refresh(). use realm.waitforchange()/stopwaitforchange() or dynamicrealm.waitforchange()/stopwaitforchange() instead.
- 0.91.0
breaking changes: removed @deprecated methods.
Comments
Post a Comment