首页 > 代码库 > 关于MessageQueue-JNI的错误问题解决
关于MessageQueue-JNI的错误问题解决
11-19 14:46:23.016: E/MessageQueue-JNI(10777): Exception in MessageQueue callback: handleReceiveCallback 11-19 14:46:23.026: E/MessageQueue-JNI(10777): java.lang.IllegalArgumentException: parameter must be a descendant of this view 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:4420) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:4357) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder$SequentialFocusComparator.getRect(FocusFinder.java:688) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder$SequentialFocusComparator.compare(FocusFinder.java:660) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder$SequentialFocusComparator.compare(FocusFinder.java:641) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at java.util.TimSort.countRunAndMakeAscending(TimSort.java:320) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at java.util.TimSort.sort(TimSort.java:185) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at java.util.TimSort.sort(TimSort.java:169) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at java.util.Arrays.sort(Arrays.java:2038) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at java.util.Collections.sort(Collections.java:1891) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder.findNextInputFocusInRelativeDirection(FocusFinder.java:198) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder.findNextFocus(FocusFinder.java:166) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder.findNextInputFocus(FocusFinder.java:102) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder.findNextFocus(FocusFinder.java:83) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.FocusFinder.findNextFocus(FocusFinder.java:65) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewRootImpl.focusSearch(ViewRootImpl.java:3994) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewRootImpl.clearChildFocus(ViewRootImpl.java:2635) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.clearChildFocus(ViewGroup.java:863) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3787) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3748) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.view.ViewGroup.removeView(ViewGroup.java:3680) 11-19 14:46:23.026: E/MessageQueue-JNI(10777): at android.support.v4.view.ViewPager.removeView(ViewPager.java:1321)
这个错误的解决:
ViewPager中调用的方法:
try { myPetAdapter.destroyItem((View) select_pet_mores_viewPager, arg0, null); views[arg0] = myPetAdapter.instantiateItem((View) select_pet_mores_viewPager, arg0); } catch (Exception e) { // TODO: handle exception MM.sysout("Exception in MessageQueue callback: handleReceiveCallback"); }
其中调用了:destroyItem、instantiateItem
加入异常处理就可以了
关于MessageQueue-JNI的错误问题解决
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。