任何人都可以帮我找到这个错误背后的原因??。我无法弄清楚实际问题。应用程序没有崩溃在我的手机上,但我在Play商店更新了应用程序后,我收到了来自crashlytics的错误报告由于这个错误,应用程序在其他一些手机上崩溃了。我使用了一个gradient.xml作为drawable来设置cardview和另一个布局的渐变,请看我的gradient.xml,下面我找不到这个文件中的任何错误任何人都可以帮我找出问题吗?
Fatal Exception: java.lang.IllegalArgumentException radius must be > 0
android.graphics.RadialGradient. (RadialGradient.java:53)
android.support.v7.widget.RoundRectDrawableWithShadow.buildShadowCorners (Unknown Source)
android.support.v7.widget.RoundRectDrawableWithShadow.setBackground (Unknown Source)
android.support.v7.widget.RoundRectDrawableWithShadow.draw (Unknown Source)
android.view.View.draw (View.java:14707)
android.widget.FrameLayout.draw (FrameLayout.java:534)
android.view.View.getDisplayList (View.java:13588)
android.view.View.getDisplayList (View.java:13635)
android.view.View.draw (View.java:14430)
android.view.ViewGroup.drawChild (ViewGroup.java:3252)
android.support.v7.widget.RecyclerView.drawChild (Unknown Source)
android.view.ViewGroup.dispatchDraw (ViewGroup.java:3070)
android.view.View.draw (View.java:14739)
android.support.v7.widget.RecyclerView.draw (Unknown Source)
android.view.View.getDisplayList (View.java:13588)
android.view.View.getDisplayList (View.java:13635)
android.view.View.draw (View.java:14430)
android.view.ViewGroup.drawChild (ViewGroup.java:3252)
android.view.ViewGroup.dispatchDraw (ViewGroup.java:3070)
android.view.View.getDisplayList (View.java:13580)
android.view.View.getDisplayList (View.java:13635)
android.view.View.draw (View.java:14430)
android.view.ViewGroup.drawChild (ViewGroup.java:3252)
android.view.ViewGroup.dispatchDraw (ViewGroup.java:3070)
android.view.View.draw (View.java:14739)
android.widget.FrameLayout.draw (FrameLayout.java:534)
android.view.View.getDisplayList (View.java:13588)
android.view.View.getDisplayList (View.java:13635)
android.view.View.draw (View.java:14430)
android.view.ViewGroup.dispatchDraw (ViewGroup.java:3070)
android.view.View.getDisplayList (View.java:13580)
android.view.View.getDisplayList (View.java:13635)
android.view.View.draw (View.java:14430)
gradient.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="@null"
android:startColor="#B3000000"
android:type="linear"/>
<corners
android:radius="1dp"/>
答案 0 :(得分:0)
尝试删除你的android:endColor =&#34; @ null&#34;,如果你不想有颜色就不要添加它。或尝试透明色。