Following is the build.gradle code in Android Studio
apply plugin: \'com.android.application\' android { compileSdkVersion 23 buildToolsVersion \"23
SETTINGS -> Build, Execution, Deployment -> Gradle -> unselect Offline work Then sync project, you are good to go. If not working , then File > Invalidate caches / Restart - > Invalidate and Restart.