Upgrade to newer version of Android Studio and Gradle
Replace Gallery with EcoGallery