Open Ktirumalsetty opened 4 years ago
Same issue here, any schedule or work around?
Crash happened in :
if (VERSION.SDK_INT >= 14) {
this.mSelectorPosition = (Integer)ReflectionUtils.getFieldValue(AbsListView.class, "mSelectorPosition", this);
} else {
this.mSelectorPosition = (Integer)ReflectionUtils.getFieldValue(AbsListView.class, "mMotionPosition", this);
}
in dispatchDraw(Canvas), where
ReflectionUtils.getFieldValue(AbsListView.class, "mSelectorPosition", this)
returns null.
So problem is that will author upgrade this library anymore?
用ExpandableListView 替换掉FloatingGroupExpandableListView即可解决奔溃问题。引发的原因是:mSelectorPosition在android10(sdk= 30)上被添加了注解 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P 最大sdk =28 ) int mSelectorPosition = INVALID_POSITION;ReflectionUtils.getFieldValue(AbsListView.class, "mSelectorPosition", this)使用反射是拿不到这个成员变量的值的。
Hello, Will there be an update for Android 10 ?
用ExpandableListView 替换掉FloatingGroupExpandableListView即可解决奔溃问题。引发的原因是:mSelectorPosition在android10(sdk= 30)上被添加了注解 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P 最大sdk =28 ) int mSelectorPosition = INVALID_POSITION;ReflectionUtils.getFieldValue(AbsListView.class, "mSelectorPosition", this)使用反射是拿不到这个成员变量的值的。
意思是不用推荐用这个库吗?直接用ExpandableListView ?
用ExpandableListView 替换掉FloatingGroupExpandableListView即可解决奔溃问题。引发的原因是:mSelectorPosition在android10(sdk= 30)上被添加了注解 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P 最大sdk =28 ) int mSelectorPosition = INVALID_POSITION;ReflectionUtils.getFieldValue(AbsListView.class, "mSelectorPosition", this)使用反射是拿不到这个成员变量的值的。
reflection sucks, reflection not public field sucks.
2020-07-24 00:44:21.690 7989-7989/com.KryptosTextApp.KryptosText E/AndroidRuntime: FATAL EXCEPTION: main Process: com.KryptosTextApp.KryptosText, PID: 7989 java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference at com.diegocarloslima.fgelv.lib.FloatingGroupExpandableListView.dispatchDraw(FloatingGroupExpandableListView.java:192) at android.view.View.draw(View.java:21424) at android.widget.AbsListView.draw(AbsListView.java:4388) at android.view.View.updateDisplayListIfDirty(View.java:20298) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at android.view.View.updateDisplayListIfDirty(View.java:20298) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at androidx.viewpager.widget.ViewPager.draw(ViewPager.java:2426) at android.view.View.updateDisplayListIfDirty(View.java:20298) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at android.view.View.updateDisplayListIfDirty(View.java:20298) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at androidx.drawerlayout.widget.DrawerLayout.drawChild(DrawerLayout.java:1478) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at android.view.View.updateDisplayListIfDirty(View.java:20298) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) 2020-07-24 00:44:21.693 7989-7989/com.KryptosTextApp.KryptosText E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:20289) at android.view.View.draw(View.java:21153) at android.view.ViewGroup.drawChild(ViewGroup.java:4388)