title: flutter run failed: A problem occurred configuring project ':shared_preferences'
body: <p>I am Using flutter 1.2 and my project runs successfully before I add shared_preferences package to it.I am using  <code>shared_preferences: ^0.5.1+2.</code> after I add it, <code>flutter run</code> command creates this error:</p>
  
  <blockquote>
    <ul>
    <li>Error running Gradle: ProcessException: Process "/home//Desktop/projects/fycx/android/gradlew" exited abnormally:
    Starting a Gradle Daemon, 1 busy Daemon could not be reused, use
    --status for details</li>
    </ul>
    
    <blockquote>
      <p>Configure project :shared_preferences</p>
    </blockquote>
    
    <p>Project evaluation failed including an error in afterEvaluate {}. Run
    with --stacktrace for details of the afterEvaluate {} error.</p>
    
    <p>FAILURE: Build failed with an exception.</p>
    
    <ul>
    <li><p>What went wrong: A problem occurred configuring project ':shared_preferences'.</p>
    
    <blockquote>
      <p>Could not resolve all artifacts for configuration ':shared_preferences:classpath'.
      Could not find gradle.jar (com.android.tools.build:gradle:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.jar</a>
      Could not find gradle-core.jar (com.android.tools.build:gradle-core:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.jar</a>
      Could not find bundletool.jar (com.android.tools.build:bundletool:0.1.0-alpha01).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.jar</a>
      Could not find builder.jar (com.android.tools.build:builder:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.jar</a>
      Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar</a>
      Could not find gradle-api.jar (com.android.tools.build:gradle-api:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.jar</a>
      Could not find compilerCommon.jar (com.android.databinding:compilerCommon:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.jar</a>
      Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.jar</a>
      Could not find sdk-common.jar (com.android.tools:sdk-common:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.jar</a>
      Could not find sdklib.jar (com.android.tools:sdklib:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.jar</a>
      Could not find repository.jar (com.android.tools:repository:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.jar</a>
      Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.jar</a>
      Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.jar</a>
      Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar</a>
      Could not find shared.jar (com.android.tools.analytics-library:shared:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.jar</a>
      Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.jar</a>
      Could not find dvlib.jar (com.android.tools:dvlib:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.jar</a>
      Could not find common.jar (com.android.tools:common:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.jar</a>
      Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.1.0).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.jar</a>
      Could not find protos.jar (com.android.tools.analytics-library:protos:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.jar</a>
      Could not find builder-model.jar (com.android.tools.build:builder-model:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.jar</a>
      Could not find apksig.jar (com.android.tools.build:apksig:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.jar</a>
      Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.jar</a>
      Could not find annotations.jar (com.android.tools:annotations:26.1.2).
       Searched in the following locations:
           <a href="https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.jar" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.jar</a></p>
    </blockquote></li>
    <li><p>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.</p></li>
    <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p></li>
    </ul>
    
    <p>BUILD FAILED in 51s   Command:
    /home/Desktop/projects/fycx/android/gradlew app:properties</p>
    
    <p>Please review your Gradle project setup in the android/ folder.</p>
  </blockquote>