【发布时间】:2017-05-14 09:48:00
【问题描述】:
我在我的项目中使用rippleeffect library。但是在Android Nougat and Marshmallow 中,App 会因为这个库而崩溃:
compile 'com.github.traex.rippleeffect:library:1.3'
错误信息是:
致命异常:主要 进程:com.test.testapp,PID:17713 java.lang.IllegalStateException:恢复中的下溢 - 恢复多于保存 在 android.graphics.Canvas.native_restore(本机方法) 在 android.graphics.Canvas.restore(Canvas.java:522) 在 com.andexert.library.RippleView.draw(RippleView.java:170) ……………………………………………………………………………… ......................
就以下链接而言,这是一个已知问题。 https://github.com/traex/RippleEffect/issues/76 我也尝试了很多来自 stackoverflow 的解决方案,但到目前为止运气确实不错!!!
有什么办法可以解决这个问题?
【问题讨论】:
-
我认为您可以通过将 -targetSdkVersion 降级到 22 来修复此错误,但我不建议使用它!你不需要库来使用涟漪效应
-
这个问题出现在 Android API Level 23 (Marshmallow) 中。我将库版本更新为最新版本。他们已经解决了这个错误。
标签: android ripple rippledrawable