I have this line of code in a fragment and using the kotlin android extensions: mAnimationDrawable = swipe_refresh_layout!!.background as AnimationDrawable but the swipe_refresh_layout!! throws a RuntimeException. Do someone know hot to solve this problem?