title: Gradle build error "Configuration with name 'default' not found."
body: <p>I want to modify the library <a href="https://github.com/SundeepK/CompactCalendarView" rel="nofollow noreferrer">CompactCalendarView</a> as per my requirement, so I have to add it as a submodule to my project. However, when I am trying to build the app it gives me this error, "Configuration with name 'default' not found".</p>
  
  <p>I know it is related to some dependency and gradle build. But, I have 0 experience with gradle files and I have been trying to solve this from past 3-4 hours with no success. Please help me in resolving this issue.</p>
  
  <p>This is what the android studio log says about the error.</p>
  
  <pre><code>2017-01-10 03:53:30,852 [2082900] WARN - nal.AbstractExternalSystemTask - Configuration with name 'default' not found.
  com.intellij.openapi.externalSystem.model.ExternalSystemException: Configuration with name 'default' not found.
  at org.jetbrains.plugins.gradle.service.project.AbstractProjectImportErrorHandler.createUserFriendlyError(AbstractProjectImportErrorHandler.java:106)
  at org.jetbrains.plugins.gradle.service.project.BaseProjectImportErrorHandler.getUserFriendlyError(BaseProjectImportErrorHandler.java:158)
  at org.jetbrains.plugins.gradle.service.project.BaseGradleProjectResolverExtension.getUserFriendlyError(BaseGradleProjectResolverExtension.java:579)
  at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.getUserFriendlyError(AbstractProjectResolverExtension.java:158)
  at com.android.tools.idea.gradle.project.AndroidGradleProjectResolver.getUserFriendlyError(AndroidGradleProjectResolver.java:405)
  at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:772)
  at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:752)
  at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.execute(GradleExecutionHelper.java:238)
  at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:112)
  at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:73)
  at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)
  at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)
  at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
  at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
  at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)
  at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:51)
  at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
  at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
  at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
  at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
  at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
  at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
  at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
  at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
  at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
  at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>This what my apps build.gradle dependencies section looks like.</p>
  
  <pre><code>    dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:23.4.0'
      compile 'com.android.support:support-v4:23.4.0'
      compile project(':CompactCalendarView')
      testCompile 'junit:junit:4.12'
  }
  </code></pre>
  
  <p>The build.gradle file inside the CompactCalendarView folder. This was supplied with the library.</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.2.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p>build.gradle file at CompactCalendarView/ library/ This was also supplied with the library.</p>
  
  <pre><code>apply plugin: 'com.android.library'
  apply plugin: 'idea'
  
      idea {
          module {
              downloadJavadoc = false
  
              downloadSources = true
          }
      }
  
      repositories {
          jcenter()
          mavenCentral()
      }
  
  
      android {
          compileSdkVersion 24
          buildToolsVersion '24.0.3'
  
          defaultConfig {
              minSdkVersion 15
              targetSdkVersion 24
              versionCode 1
              versionName "1.0"
          }
          buildTypes {
              release {
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              }
          }
      }
  
      dependencies {
          compile fileTree(include: ['*.jar'], dir: 'libs')
          compile 'com.android.support:appcompat-v7:24.2.1'
          //mockito dependencies
          testCompile 'junit:junit:4.12'
          testCompile 'org.mockito:mockito-core:1.9.0'
      }
  </code></pre>
  
  <p>My settings.gradle</p>
  
  <pre><code>include ':app', ':CompactCalendarView'
  </code></pre>
  
  <p>My project structure</p>
  
  <pre><code>/Project
      /app
          -build.gradle
  
      /CompactCalendarView
          /library
              -build.gradle       
          -build.gradle
  
      -build.gradle
      -settings.gradle
  </code></pre>
  
  <p>I have tried</p>
  
  <ul>
  <li><p>Updating the gradle version in the library to same as of my project.</p></li>
  <li><p>Deleting the .gradle file from 'Users' folder in C drive and from the project.</p></li>
  <li><p>Redownloading a new version of gradle. And setting it up manually.</p></li>
  </ul>