Closed ghost closed 5 years ago
implementation 'com.yuyashuai.frameanimation:frameanimation:2.0.2'
升级到2.0.2, 去掉下面的代码,切换动画时不要调用停止播放试下
if(simpleDraweeView.isPlaying()) {
simpleDraweeView.stopAnimation();
}
有使用2.0.2,在所下载的Demo里面,我放入了自己的图片40张。在动画快要结束的时候点击start,帧动画有时显示不出。并报错
java.lang.InterruptedException
2019-05-30 15:43:38.433 27319-27419/com.yuyashuai.silkyanimation W/System.err: at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1022)
2019-05-30 15:43:38.433 27319-27419/com.yuyashuai.silkyanimation W/System.err: at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1328)
2019-05-30 15:43:38.433 27319-27419/com.yuyashuai.silkyanimation W/System.err: at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:232)
2019-05-30 15:43:38.433 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.decodeBitmap(DefaultBitmapPool.kt:150)
2019-05-30 15:43:38.433 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.decodeBitmap(DefaultBitmapPool.kt:155)
2019-05-30 15:43:38.451 27319-27419/com.yuyashuai.silkyanimation I/chatty: uid=10161(com.yuyashuai.silkyanimation) Thread-14 identical 410 lines
2019-05-30 15:43:38.451 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.decodeBitmap(DefaultBitmapPool.kt:155)
2019-05-30 15:43:38.451 27319-27319/com.yuyashuai.silkyanimation I/Toast: Show toast from OpPackageName:com.yuyashuai.silkyanimation, PackageName:com.yuyashuai.silkyanimation
2019-05-30 15:43:38.451 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.decodeBitmap(DefaultBitmapPool.kt:155)
2019-05-30 15:43:38.472 27319-27419/com.yuyashuai.silkyanimation I/chatty: uid=10161(com.yuyashuai.silkyanimation) identical 492 lines
2019-05-30 15:43:38.472 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.decodeBitmap(DefaultBitmapPool.kt:155)
2019-05-30 15:43:38.472 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.access$decodeBitmap(DefaultBitmapPool.kt:13)
2019-05-30 15:43:38.472 27319-27419/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool$start$2.run(DefaultBitmapPool.kt:86)
2019-05-30 15:43:38.472 27319-27419/com.yuyashuai.silkyanimation W/System.err: at java.lang.Thread.run(Thread.java:764)
2019-05-30 15:43:38.800 27319-27427/com.yuyashuai.silkyanimation W/System.err: java.lang.InterruptedException
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1022)
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1328)
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:232)
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.decodeBitmap(DefaultBitmapPool.kt:150)
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool.access$decodeBitmap(DefaultBitmapPool.kt:13)
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at com.yuyashuai.frameanimation.io.DefaultBitmapPool$start$2.run(DefaultBitmapPool.kt:86)
2019-05-30 15:43:38.801 27319-27427/com.yuyashuai.silkyanimation W/System.err: at java.lang.Thread.run(Thread.java:764)
已更新
implementation 'com.yuyashuai.frameanimation:frameanimation:2.0.3'
当我一直尝试重复播放一段帧动画时,有很大概率曝出以下异常并且动画不显示。也就是以上一段代码。