Make sure your build.gradle is apply plugin: 'com.android.application' not apply plugin: 'com.android.library' After you have changed, please sync your gradle again. or try this I fixed this by adding facets in Module settings. They were missing. right click on project > open Module settings > Facet...