Updates for Gradle and fix for crashing onRestoreState