Following is the build.gradle code in Android Studio
apply plugin: \'com.android.application\' android { compileSdkVersion 23 buildToolsVersion \"23
I enabled "Offline-Work" under File -> Settings ->Build,Deploy, Exec -> Gradle And this finally resolved the issue for me.