android - IllegalArgumentException: Comparison method violates its general contract -
can decipher following exception? not doing relates directly error saying (i not doing sorting or comparing). crash happens when user interacting activity, , seems view related. cannot myself reproduce it.
e/androidruntime( 5668): fatal exception: main e/androidruntime( 5668): process: com.example.myapp, pid: 5668 e/androidruntime( 5668): java.lang.illegalargumentexception: comparison method violates general contract! e/androidruntime( 5668): @ java.util.comparabletimsort.mergehi(comparabletimsort.java:831) e/androidruntime( 5668): @ java.util.comparabletimsort.mergeat(comparabletimsort.java:449) e/androidruntime( 5668): @ java.util.comparabletimsort.mergeforcecollapse(comparabletimsort.java:388) e/androidruntime( 5668): @ java.util.comparabletimsort.sort(comparabletimsort.java:187) e/androidruntime( 5668): @ java.util.comparabletimsort.sort(comparabletimsort.java:142) e/androidruntime( 5668): @ java.util.arrays.sort(arrays.java:1957) e/androidruntime( 5668): @ java.util.collections.sort(collections.java:1864) e/androidruntime( 5668): @ android.view.viewgroup$childlistforaccessibility.init(viewgroup.java:6882) e/androidruntime( 5668): @ android.view.viewgroup$childlistforaccessibility.obtain(viewgroup.java:6847) e/androidruntime( 5668): @ android.view.viewgroup.addchildrenforaccessibility(viewgroup.java:1727) e/androidruntime( 5668): @ android.view.viewgroup.addchildrenforaccessibility(viewgroup.java:1736) e/androidruntime( 5668): @ android.view.viewgroup.oninitializeaccessibilitynodeinfointernal(viewgroup.java:2634) e/androidruntime( 5668): @ android.view.view$accessibilitydelegate.oninitializeaccessibilitynodeinfo(view.java:19765) e/androidruntime( 5668): @ android.support.v4.i.b.a(unknown source) e/androidruntime( 5668): @ android.support.v4.widget.nestedscrollview$a.a(unknown source) e/androidruntime( 5668): @ android.support.v4.i.b$a$1.oninitializeaccessibilitynodeinfo(unknown source) e/androidruntime( 5668): @ android.view.view.oninitializeaccessibilitynodeinfo(view.java:5252) e/androidruntime( 5668): @ android.widget.framelayout.oninitializeaccessibilitynodeinfo(framelayout.java:651) e/androidruntime( 5668): @ android.view.view.createaccessibilitynodeinfointernal(view.java:5215) e/androidruntime( 5668): @ android.view.view$accessibilitydelegate.createaccessibilitynodeinfo(view.java:19834) e/androidruntime( 5668): @ android.view.view.createaccessibilitynodeinfo(view.java:5200) e/androidruntime( 5668): @ android.view.accessibilityinteractioncontroller$accessibilitynodeprefetcher.prefetchdescendantsofrealnode(accessibilityinteractioncontroller.java:811) e/androidruntime( 5668): @ android.view.accessibilityinteractioncontroller$accessibilitynodeprefetcher.prefetchaccessibilitynodeinfos(accessibilityinteractioncontroller.java:720) e/androidruntime( 5668): @ android.view.accessibilityinteractioncontroller.findaccessibilitynodeinfobyaccessibilityiduithread(accessibilityinteractioncontroller.java:147) e/androidruntime( 5668): @ android.view.accessibilityinteractioncontroller.access$300(accessibilityinteractioncontroller.java:49) e/androidruntime( 5668): @ android.view.accessibilityinteractioncontroller$privatehandler.handlemessage(accessibilityinteractioncontroller.java:971) e/androidruntime( 5668): @ android.os.handler.dispatchmessage(handler.java:110) e/androidruntime( 5668): @ android.os.looper.loop(looper.java:193) e/androidruntime( 5668): @ android.app.activitythread.main(activitythread.java:5359) e/androidruntime( 5668): @ java.lang.reflect.method.invokenative(native method) e/androidruntime( 5668): @ java.lang.reflect.method.invoke(method.java:515) e/androidruntime( 5668): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:824) e/androidruntime( 5668): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:640) e/androidruntime( 5668): @ dalvik.system.nativestart.main(native method)
edit 1: question not duplicate of this one because above, i'm not directly doing sorting operations. not sure why downvotes either.
edit 2:
i've noticed support libraries i'm including in build.gradle
file following:
compile 'com.android.support:appcompat-v7:26.0.2' compile 'com.android.support:design:26.0.2'
but note here android.support.v4.widget.nestedscrollview
(used in layout , referred in crash report above) found in core-ui
component. should including following:
compile 'com.android.support:support-core-ui:26.0.2'
maybe core-ui
component included way of appcompat-v7
?
other support libraries import way of:
import android.support.design.widget.floatingactionbutton; import android.support.v4.app.activitycompat; import android.support.v4.view.viewcompat; import android.support.v4.app.dialogfragment; import android.support.v4.content.contextcompat; import android.support.v4.app.notificationcompat; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar;
i admit being confused on needs in build.gradle
, include @ moment, has never complained before when compiling app not being able find library code, , mentioned, crash happens small number of users.
Comments
Post a Comment