Fix a bug caused by gradle 2.X