The default project structure for an Android app module. Since your IntelliJ project does not use the same structure, your build.gradle file needs to point the source directories for the build to your existing folders (for example, res/ and src/) instead of the default new directory structure. The following example build.gradle file includes the basic setup for a Gradle build, as well as a sourceSets{} block inside the android{} block to define the correct source directories and move the tests and build types to avoid naming conflicts.