Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #8

Open
yaojunyi3721 opened this issue May 23, 2017 · 4 comments
Open

Crash #8

yaojunyi3721 opened this issue May 23, 2017 · 4 comments

Comments

@yaojunyi3721
Copy link

华为 P6 S-U06
Android 4.4.2,level 19
DropDownMenu:v0.9
compileSdkVersion 25
buildToolsVersion "25.0.2"
minSdkVersion 15
targetSdkVersion 25

多个menucount时会在DropDownMenu.onDraw(DropDownMenu.java:243)抛出NullPointerException

@yaojunyi3721
Copy link
Author

已排除其他原因
确定和手机以及menucount有关

@yaojunyi3721
Copy link
Author

就是在super.onDraw(canvas)里出的错 canvas本身并不为null
出错堆栈
1 android.view.GLES20Canvas.setupModifiers(GLES20Canvas.java:1439)
2 android.view.GLES20Canvas.drawLines(GLES20Canvas.java:1019)
3 android.view.GLES20Canvas.drawLine(GLES20Canvas.java:1009)
4 android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:538)
5 android.widget.LinearLayout.drawVerticalDivider(LinearLayout.java:417)
6 android.widget.LinearLayout.drawDividersHorizontal(LinearLayout.java:381)
7 android.widget.LinearLayout.onDraw(LinearLayout.java:321)
8 com.jayfang.dropdownmenu.DropDownMenu.onDraw(DropDownMenu.java:243)
9 android.view.View.draw(View.java:14522)
10 android.view.View.getDisplayList(View.java:13406)
11 android.view.View.getDisplayList(View.java:13448)
12 android.view.View.draw(View.java:14239)
13 android.view.ViewGroup.drawChild(ViewGroup.java:3121)
14 android.view.ViewGroup.dispatchDraw(ViewGroup.java:2947)
15 android.view.View.draw(View.java:14525)
16 android.view.View.getDisplayList(View.java:13406)
17 android.view.View.getDisplayList(View.java:13448)
18 android.view.View.draw(View.java:14239)
19 android.view.ViewGroup.drawChild(ViewGroup.java:3121)
20 android.view.ViewGroup.dispatchDraw(ViewGroup.java:2947)

@yaojunyi3721
Copy link
Author

我这使用场景是viewpager+3个fragment
每个Fragment都有dropdownmenu

我从这里找到了答案
https://issuetracker.google.com/issues/37058329
试试看是否管用

@yaojunyi3721
Copy link
Author

解决不了 最后调高minSdkVersion到21 放弃对Android4.4及以下版本的支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant