Couldn't locate lint-gradle-api-26.1.2.jar for Flutter project












88















I'm new to Flutter and trying to run the example project when you create a new one. When trying to run it, I have this issue:



FAILURE: Build failed with an exception.




  • Where:
    Build file 'PROJECTPATH/android/app/build.gradle' line: 25



  • What went wrong:
    A problem occurred evaluating project ':app'.




    Could not resolve all files for configuration 'classpath'.
    Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
    Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar





I understand it's trying to get the file "lint-gradle-api-26.1.2.jar" from the jcenter repository but when following the link I get this:



{
"errors" : [ {
"status" : 404,
"message" : "Could not find resource"
} ]
}


So I added the Google repository in my build.gradle file:



buildscript {
repositories {
maven { url 'https://dl.google.com/' }
google()
jcenter()
}


...and I also succeed to get the file by following this link:



https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar



...but I'm still getting the same error when trying to run my project, whether it is by using Visual Studio Code, Android Studio or with the CLI.



How do I force Gradle to download the file from the link I've found?



Here's how my build.gradle file looks like:



buildscript {
repositories {
//maven { url 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar' }
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

allprojects {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}

....









share|improve this question

























  • Maybe this will help: stackoverflow.com/a/52944600/4255978

    – HedeH
    Oct 23 '18 at 8:59











  • It didn't, still getting the same error

    – Quentin Ellak
    Oct 23 '18 at 9:02






  • 3





    For people coming here now, I think this has been fixed in master, so flutter channel master and flutter upgrade should sove it.

    – Ab Sin
    Nov 5 '18 at 5:47
















88















I'm new to Flutter and trying to run the example project when you create a new one. When trying to run it, I have this issue:



FAILURE: Build failed with an exception.




  • Where:
    Build file 'PROJECTPATH/android/app/build.gradle' line: 25



  • What went wrong:
    A problem occurred evaluating project ':app'.




    Could not resolve all files for configuration 'classpath'.
    Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
    Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar





I understand it's trying to get the file "lint-gradle-api-26.1.2.jar" from the jcenter repository but when following the link I get this:



{
"errors" : [ {
"status" : 404,
"message" : "Could not find resource"
} ]
}


So I added the Google repository in my build.gradle file:



buildscript {
repositories {
maven { url 'https://dl.google.com/' }
google()
jcenter()
}


...and I also succeed to get the file by following this link:



https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar



...but I'm still getting the same error when trying to run my project, whether it is by using Visual Studio Code, Android Studio or with the CLI.



How do I force Gradle to download the file from the link I've found?



Here's how my build.gradle file looks like:



buildscript {
repositories {
//maven { url 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar' }
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

allprojects {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}

....









share|improve this question

























  • Maybe this will help: stackoverflow.com/a/52944600/4255978

    – HedeH
    Oct 23 '18 at 8:59











  • It didn't, still getting the same error

    – Quentin Ellak
    Oct 23 '18 at 9:02






  • 3





    For people coming here now, I think this has been fixed in master, so flutter channel master and flutter upgrade should sove it.

    – Ab Sin
    Nov 5 '18 at 5:47














88












88








88


21






I'm new to Flutter and trying to run the example project when you create a new one. When trying to run it, I have this issue:



FAILURE: Build failed with an exception.




  • Where:
    Build file 'PROJECTPATH/android/app/build.gradle' line: 25



  • What went wrong:
    A problem occurred evaluating project ':app'.




    Could not resolve all files for configuration 'classpath'.
    Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
    Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar





I understand it's trying to get the file "lint-gradle-api-26.1.2.jar" from the jcenter repository but when following the link I get this:



{
"errors" : [ {
"status" : 404,
"message" : "Could not find resource"
} ]
}


So I added the Google repository in my build.gradle file:



buildscript {
repositories {
maven { url 'https://dl.google.com/' }
google()
jcenter()
}


...and I also succeed to get the file by following this link:



https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar



...but I'm still getting the same error when trying to run my project, whether it is by using Visual Studio Code, Android Studio or with the CLI.



How do I force Gradle to download the file from the link I've found?



Here's how my build.gradle file looks like:



buildscript {
repositories {
//maven { url 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar' }
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

allprojects {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}

....









share|improve this question
















I'm new to Flutter and trying to run the example project when you create a new one. When trying to run it, I have this issue:



FAILURE: Build failed with an exception.




  • Where:
    Build file 'PROJECTPATH/android/app/build.gradle' line: 25



  • What went wrong:
    A problem occurred evaluating project ':app'.




    Could not resolve all files for configuration 'classpath'.
    Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
    Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar





I understand it's trying to get the file "lint-gradle-api-26.1.2.jar" from the jcenter repository but when following the link I get this:



{
"errors" : [ {
"status" : 404,
"message" : "Could not find resource"
} ]
}


So I added the Google repository in my build.gradle file:



buildscript {
repositories {
maven { url 'https://dl.google.com/' }
google()
jcenter()
}


...and I also succeed to get the file by following this link:



https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar



...but I'm still getting the same error when trying to run my project, whether it is by using Visual Studio Code, Android Studio or with the CLI.



How do I force Gradle to download the file from the link I've found?



Here's how my build.gradle file looks like:



buildscript {
repositories {
//maven { url 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar' }
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

allprojects {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
}

repositories {
google()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}

....






android android-studio dart flutter jcenter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 13:06









Peter Mortensen

13.7k1986113




13.7k1986113










asked Oct 23 '18 at 8:58









Quentin EllakQuentin Ellak

1,8552715




1,8552715













  • Maybe this will help: stackoverflow.com/a/52944600/4255978

    – HedeH
    Oct 23 '18 at 8:59











  • It didn't, still getting the same error

    – Quentin Ellak
    Oct 23 '18 at 9:02






  • 3





    For people coming here now, I think this has been fixed in master, so flutter channel master and flutter upgrade should sove it.

    – Ab Sin
    Nov 5 '18 at 5:47



















  • Maybe this will help: stackoverflow.com/a/52944600/4255978

    – HedeH
    Oct 23 '18 at 8:59











  • It didn't, still getting the same error

    – Quentin Ellak
    Oct 23 '18 at 9:02






  • 3





    For people coming here now, I think this has been fixed in master, so flutter channel master and flutter upgrade should sove it.

    – Ab Sin
    Nov 5 '18 at 5:47

















Maybe this will help: stackoverflow.com/a/52944600/4255978

– HedeH
Oct 23 '18 at 8:59





Maybe this will help: stackoverflow.com/a/52944600/4255978

– HedeH
Oct 23 '18 at 8:59













It didn't, still getting the same error

– Quentin Ellak
Oct 23 '18 at 9:02





It didn't, still getting the same error

– Quentin Ellak
Oct 23 '18 at 9:02




3




3





For people coming here now, I think this has been fixed in master, so flutter channel master and flutter upgrade should sove it.

– Ab Sin
Nov 5 '18 at 5:47





For people coming here now, I think this has been fixed in master, so flutter channel master and flutter upgrade should sove it.

– Ab Sin
Nov 5 '18 at 5:47












13 Answers
13






active

oldest

votes


















125














I solved the problem by moving:



maven {
url 'https://dl.google.com/dl/android/maven2'
}


in the top of:



jcenter()


in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle:



    buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}





share|improve this answer





















  • 1





    Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

    – Gayan Pathirage
    Oct 25 '18 at 17:28








  • 1





    Saved me. I was facing the same issue

    – Gaurav Sharma
    Oct 25 '18 at 18:15











  • Saved as well. Thanks a bunch

    – Carles
    Oct 27 '18 at 17:43






  • 9





    By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

    – Kevin Robatel
    Oct 29 '18 at 19:47











  • I can also confirm this is the right answer.

    – SEG.Veenstra
    Nov 1 '18 at 19:26



















41














Modify flutter.gradle under ./flutter/packages/flutter_tools/gradle to upgrade the tools version to 3.2.1 and add google() to the first line:



buildscript {
repositories {
google()
jcenter()
maven {
url 'https://dl.google.com/dl/android/maven'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}


Screenshot of my code






share|improve this answer





















  • 1





    It brought me a lot of download errors

    – Quentin Ellak
    Oct 23 '18 at 10:09













  • Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

    – mano233
    Oct 23 '18 at 10:17








  • 2





    Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

    – mano233
    Oct 23 '18 at 10:21






  • 5





    see github.com/flutter/flutter/pull/23397

    – Ralph Bergmann
    Oct 23 '18 at 10:53



















19














Regarding this error, I just changed this line in the build.gradle file:



classpath 'com.android.tools.build:gradle:3.1.2'


to:



classpath 'com.android.tools.build:gradle:3.1.3'


And that solved my problem.






share|improve this answer


























  • It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

    – AloDev
    Nov 12 '18 at 13:00



















14














This is just a bug in the Gradle file located at C:flutterpackagesflutter_toolsgradleflutter.gradle at line 25.



All you have to do is just edit this file by moving it to the top:



maven {
url 'https://dl.google.com/dl/android/maven2'
}


Change from this



buildscript {
repositories {

jcenter()
maven {
url 'https://dl.google.com/dl/android/maven2'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}


to this:



buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
}
dependencies {`enter code here`
classpath 'com.android.tools.build:gradle:3.1.2'
}
}





share|improve this answer

































    6














    This is related to Flutter 0.9.4 at the moment. It will be fixed in the next release. In the meantime, you can update Flutter manually by running the commands described in "Flutter Upgrade". Basically they involve the following:





    1. Change the Flutter GitHub channel to master by running on the command prompt:



      flutter channel master



    2. Upgrade Flutter itself by running



      flutter upgrade



    Once the upgrade is done, run the test drive application, and it should compile successfully.






    share|improve this answer


























    • You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

      – cesards
      Nov 3 '18 at 17:43











    • This is working for me tried almost all solutions

      – Pratik Mohanrao Gondil
      Dec 3 '18 at 6:54





















    4














    Solution:



    Put
    maven {
    url 'https://dl.google.com/dl/android/maven2'
    }
    at the top of:
    jcenter()


    in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :
    The file is in the Flutter SDK.






    share|improve this answer


























    • HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

      – vijju
      Nov 12 '18 at 6:55











    • You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

      – Aegon
      Nov 12 '18 at 11:22





















    3














    this fixed my issue,SO reference here:



    In your root build.gradle make sure google() is before jcenter().



    repositories {
    google()
    jcenter()
    }


    In most projects you will have to update this in 2 spots.



    buildscript {
    repositories {
    google()
    jcenter()
    }

    }

    allprojects {
    repositories {
    google()
    jcenter()
    }
    }





    share|improve this answer































      2














      Flutter Master Upgrade



      I just had this problem. The fix for me however was a lot simpler. After switching branches to dev and upgrading, I switched back to master and it worked perfectly fine.



      flutter checkout dev
      flutter upgrade


      Then switch back



      flutter checkout master
      flutter upgrade
      flutter run





      share|improve this answer

































        2














        Just try to upgrade Flutter using the following:



        flutter upgrade 


        (This issue has been fixed in the latest update.)






        share|improve this answer

































          1














          All the previous answers resolve the problem. One comment to add is the location of the flutte.gradle.



          You will find it in the directory that you installed Flutter in for the first time and not on the Flutter project.






          share|improve this answer

































            1














            I also newbie in flutter and just installed it today. And I found the same problem as you, but after three hours googling I finally solved it.



            The steps I have done are as follows:




            1. Copy "flutter.gradle" file from "https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle" into "C:flutterpackagesgradle"



            2. Then modify the content, for this part:



              buildscript {
              repositories {
              google()
              jcenter()
              }
              dependencies {
              classpath 'com.android.tools.build:gradle:3.2.1'
              }
              }


              to:



              buildscript {
              repositories {
              maven {
              url 'https://dl.google.com/dl/android/maven2'
              }
              jcenter()
              }
              dependencies {
              classpath 'com.android.tools.build:gradle:3.2.1'
              }
              }



            3. In "c:flutterbin", run this command:



              flutter channel master


              Wait until finished, and then run this command:



              flutter upgrade


            4. Wait until it finished, then re-run the project to debug,



            5. and finally the application appeared on the emulator screen.



              Picture finally running








            share|improve this answer

































              1














              For me, opening the gradle-wrapper.properties file and editing the below line like this version solved it:



              distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






              share|improve this answer

































                1














                When I encountered this error Flutter 1.0 had been released. The previous issues were fixed and still I was getting the same error.



                The following steps fixed it for me :



                1) Changing Gradle plugin version from 3.1.2 to 3.2.1 in your_project/android/build.gradle inside 'dependencies' section -



                dependencies {
                classpath 'com.android.tools.build:gradle:3.2.1'
                }


                2) Changing Gradle wrapper version from 4.4 to 4.6 in your_project/android/gradle/wrapper/gradle-wrapper.properties like so



                distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip





                share|improve this answer























                  Your Answer






                  StackExchange.ifUsing("editor", function () {
                  StackExchange.using("externalEditor", function () {
                  StackExchange.using("snippets", function () {
                  StackExchange.snippets.init();
                  });
                  });
                  }, "code-snippets");

                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "1"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52945041%2fcouldnt-locate-lint-gradle-api-26-1-2-jar-for-flutter-project%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  13 Answers
                  13






                  active

                  oldest

                  votes








                  13 Answers
                  13






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  125














                  I solved the problem by moving:



                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }


                  in the top of:



                  jcenter()


                  in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle:



                      buildscript {
                  repositories {
                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }
                  jcenter()
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.1.2'
                  }
                  }





                  share|improve this answer





















                  • 1





                    Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

                    – Gayan Pathirage
                    Oct 25 '18 at 17:28








                  • 1





                    Saved me. I was facing the same issue

                    – Gaurav Sharma
                    Oct 25 '18 at 18:15











                  • Saved as well. Thanks a bunch

                    – Carles
                    Oct 27 '18 at 17:43






                  • 9





                    By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

                    – Kevin Robatel
                    Oct 29 '18 at 19:47











                  • I can also confirm this is the right answer.

                    – SEG.Veenstra
                    Nov 1 '18 at 19:26
















                  125














                  I solved the problem by moving:



                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }


                  in the top of:



                  jcenter()


                  in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle:



                      buildscript {
                  repositories {
                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }
                  jcenter()
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.1.2'
                  }
                  }





                  share|improve this answer





















                  • 1





                    Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

                    – Gayan Pathirage
                    Oct 25 '18 at 17:28








                  • 1





                    Saved me. I was facing the same issue

                    – Gaurav Sharma
                    Oct 25 '18 at 18:15











                  • Saved as well. Thanks a bunch

                    – Carles
                    Oct 27 '18 at 17:43






                  • 9





                    By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

                    – Kevin Robatel
                    Oct 29 '18 at 19:47











                  • I can also confirm this is the right answer.

                    – SEG.Veenstra
                    Nov 1 '18 at 19:26














                  125












                  125








                  125







                  I solved the problem by moving:



                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }


                  in the top of:



                  jcenter()


                  in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle:



                      buildscript {
                  repositories {
                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }
                  jcenter()
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.1.2'
                  }
                  }





                  share|improve this answer















                  I solved the problem by moving:



                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }


                  in the top of:



                  jcenter()


                  in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle:



                      buildscript {
                  repositories {
                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }
                  jcenter()
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.1.2'
                  }
                  }






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 17 '18 at 9:49









                  Peter Mortensen

                  13.7k1986113




                  13.7k1986113










                  answered Oct 23 '18 at 10:42









                  Quentin EllakQuentin Ellak

                  1,8552715




                  1,8552715








                  • 1





                    Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

                    – Gayan Pathirage
                    Oct 25 '18 at 17:28








                  • 1





                    Saved me. I was facing the same issue

                    – Gaurav Sharma
                    Oct 25 '18 at 18:15











                  • Saved as well. Thanks a bunch

                    – Carles
                    Oct 27 '18 at 17:43






                  • 9





                    By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

                    – Kevin Robatel
                    Oct 29 '18 at 19:47











                  • I can also confirm this is the right answer.

                    – SEG.Veenstra
                    Nov 1 '18 at 19:26














                  • 1





                    Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

                    – Gayan Pathirage
                    Oct 25 '18 at 17:28








                  • 1





                    Saved me. I was facing the same issue

                    – Gaurav Sharma
                    Oct 25 '18 at 18:15











                  • Saved as well. Thanks a bunch

                    – Carles
                    Oct 27 '18 at 17:43






                  • 9





                    By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

                    – Kevin Robatel
                    Oct 29 '18 at 19:47











                  • I can also confirm this is the right answer.

                    – SEG.Veenstra
                    Nov 1 '18 at 19:26








                  1




                  1





                  Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

                  – Gayan Pathirage
                  Oct 25 '18 at 17:28







                  Thank you loads @Quentin. You saved me after 3 hours of trying various things. Gradle error seems like some dependency issue with a missing package.

                  – Gayan Pathirage
                  Oct 25 '18 at 17:28






                  1




                  1





                  Saved me. I was facing the same issue

                  – Gaurav Sharma
                  Oct 25 '18 at 18:15





                  Saved me. I was facing the same issue

                  – Gaurav Sharma
                  Oct 25 '18 at 18:15













                  Saved as well. Thanks a bunch

                  – Carles
                  Oct 27 '18 at 17:43





                  Saved as well. Thanks a bunch

                  – Carles
                  Oct 27 '18 at 17:43




                  9




                  9





                  By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

                  – Kevin Robatel
                  Oct 29 '18 at 19:47





                  By the way, .flutter is C:flutter on Windows (or the location of Flutter installation). It's not linked to a project.

                  – Kevin Robatel
                  Oct 29 '18 at 19:47













                  I can also confirm this is the right answer.

                  – SEG.Veenstra
                  Nov 1 '18 at 19:26





                  I can also confirm this is the right answer.

                  – SEG.Veenstra
                  Nov 1 '18 at 19:26













                  41














                  Modify flutter.gradle under ./flutter/packages/flutter_tools/gradle to upgrade the tools version to 3.2.1 and add google() to the first line:



                  buildscript {
                  repositories {
                  google()
                  jcenter()
                  maven {
                  url 'https://dl.google.com/dl/android/maven'
                  }
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.2.1'
                  }
                  }


                  Screenshot of my code






                  share|improve this answer





















                  • 1





                    It brought me a lot of download errors

                    – Quentin Ellak
                    Oct 23 '18 at 10:09













                  • Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

                    – mano233
                    Oct 23 '18 at 10:17








                  • 2





                    Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

                    – mano233
                    Oct 23 '18 at 10:21






                  • 5





                    see github.com/flutter/flutter/pull/23397

                    – Ralph Bergmann
                    Oct 23 '18 at 10:53
















                  41














                  Modify flutter.gradle under ./flutter/packages/flutter_tools/gradle to upgrade the tools version to 3.2.1 and add google() to the first line:



                  buildscript {
                  repositories {
                  google()
                  jcenter()
                  maven {
                  url 'https://dl.google.com/dl/android/maven'
                  }
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.2.1'
                  }
                  }


                  Screenshot of my code






                  share|improve this answer





















                  • 1





                    It brought me a lot of download errors

                    – Quentin Ellak
                    Oct 23 '18 at 10:09













                  • Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

                    – mano233
                    Oct 23 '18 at 10:17








                  • 2





                    Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

                    – mano233
                    Oct 23 '18 at 10:21






                  • 5





                    see github.com/flutter/flutter/pull/23397

                    – Ralph Bergmann
                    Oct 23 '18 at 10:53














                  41












                  41








                  41







                  Modify flutter.gradle under ./flutter/packages/flutter_tools/gradle to upgrade the tools version to 3.2.1 and add google() to the first line:



                  buildscript {
                  repositories {
                  google()
                  jcenter()
                  maven {
                  url 'https://dl.google.com/dl/android/maven'
                  }
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.2.1'
                  }
                  }


                  Screenshot of my code






                  share|improve this answer















                  Modify flutter.gradle under ./flutter/packages/flutter_tools/gradle to upgrade the tools version to 3.2.1 and add google() to the first line:



                  buildscript {
                  repositories {
                  google()
                  jcenter()
                  maven {
                  url 'https://dl.google.com/dl/android/maven'
                  }
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.2.1'
                  }
                  }


                  Screenshot of my code







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 19 '18 at 17:57









                  Federico Grandi

                  3,16621229




                  3,16621229










                  answered Oct 23 '18 at 10:01









                  mano233mano233

                  41122




                  41122








                  • 1





                    It brought me a lot of download errors

                    – Quentin Ellak
                    Oct 23 '18 at 10:09













                  • Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

                    – mano233
                    Oct 23 '18 at 10:17








                  • 2





                    Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

                    – mano233
                    Oct 23 '18 at 10:21






                  • 5





                    see github.com/flutter/flutter/pull/23397

                    – Ralph Bergmann
                    Oct 23 '18 at 10:53














                  • 1





                    It brought me a lot of download errors

                    – Quentin Ellak
                    Oct 23 '18 at 10:09













                  • Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

                    – mano233
                    Oct 23 '18 at 10:17








                  • 2





                    Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

                    – mano233
                    Oct 23 '18 at 10:21






                  • 5





                    see github.com/flutter/flutter/pull/23397

                    – Ralph Bergmann
                    Oct 23 '18 at 10:53








                  1




                  1





                  It brought me a lot of download errors

                  – Quentin Ellak
                  Oct 23 '18 at 10:09







                  It brought me a lot of download errors

                  – Quentin Ellak
                  Oct 23 '18 at 10:09















                  Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

                  – mano233
                  Oct 23 '18 at 10:17







                  Upgrade your flutter, This is my environmental information and I am working now. [√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17763.104], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] Connected device (1 available)

                  – mano233
                  Oct 23 '18 at 10:17






                  2




                  2





                  Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

                  – mano233
                  Oct 23 '18 at 10:21





                  Upgrade distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

                  – mano233
                  Oct 23 '18 at 10:21




                  5




                  5





                  see github.com/flutter/flutter/pull/23397

                  – Ralph Bergmann
                  Oct 23 '18 at 10:53





                  see github.com/flutter/flutter/pull/23397

                  – Ralph Bergmann
                  Oct 23 '18 at 10:53











                  19














                  Regarding this error, I just changed this line in the build.gradle file:



                  classpath 'com.android.tools.build:gradle:3.1.2'


                  to:



                  classpath 'com.android.tools.build:gradle:3.1.3'


                  And that solved my problem.






                  share|improve this answer


























                  • It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

                    – AloDev
                    Nov 12 '18 at 13:00
















                  19














                  Regarding this error, I just changed this line in the build.gradle file:



                  classpath 'com.android.tools.build:gradle:3.1.2'


                  to:



                  classpath 'com.android.tools.build:gradle:3.1.3'


                  And that solved my problem.






                  share|improve this answer


























                  • It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

                    – AloDev
                    Nov 12 '18 at 13:00














                  19












                  19








                  19







                  Regarding this error, I just changed this line in the build.gradle file:



                  classpath 'com.android.tools.build:gradle:3.1.2'


                  to:



                  classpath 'com.android.tools.build:gradle:3.1.3'


                  And that solved my problem.






                  share|improve this answer















                  Regarding this error, I just changed this line in the build.gradle file:



                  classpath 'com.android.tools.build:gradle:3.1.2'


                  to:



                  classpath 'com.android.tools.build:gradle:3.1.3'


                  And that solved my problem.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 25 '18 at 13:03









                  Peter Mortensen

                  13.7k1986113




                  13.7k1986113










                  answered Nov 12 '18 at 12:12









                  Alfredo ZamudioAlfredo Zamudio

                  21615




                  21615













                  • It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

                    – AloDev
                    Nov 12 '18 at 13:00



















                  • It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

                    – AloDev
                    Nov 12 '18 at 13:00

















                  It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

                  – AloDev
                  Nov 12 '18 at 13:00





                  It is strange, but downgrading the gradle from 3.1.2 to 3.0.1(in my case) helped me.

                  – AloDev
                  Nov 12 '18 at 13:00











                  14














                  This is just a bug in the Gradle file located at C:flutterpackagesflutter_toolsgradleflutter.gradle at line 25.



                  All you have to do is just edit this file by moving it to the top:



                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }


                  Change from this



                  buildscript {
                  repositories {

                  jcenter()
                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }
                  }
                  dependencies {
                  classpath 'com.android.tools.build:gradle:3.1.2'
                  }
                  }


                  to this:



                  buildscript {
                  repositories {
                  maven {
                  url 'https://dl.google.com/dl/android/maven2'
                  }
                  jcenter()
                  }
                  dependencies {`enter code here`
                  classpath 'com.android.tools.build:gradle:3.1.2'
                  }
                  }





                  share|improve this answer






























                    14














                    This is just a bug in the Gradle file located at C:flutterpackagesflutter_toolsgradleflutter.gradle at line 25.



                    All you have to do is just edit this file by moving it to the top:



                    maven {
                    url 'https://dl.google.com/dl/android/maven2'
                    }


                    Change from this



                    buildscript {
                    repositories {

                    jcenter()
                    maven {
                    url 'https://dl.google.com/dl/android/maven2'
                    }
                    }
                    dependencies {
                    classpath 'com.android.tools.build:gradle:3.1.2'
                    }
                    }


                    to this:



                    buildscript {
                    repositories {
                    maven {
                    url 'https://dl.google.com/dl/android/maven2'
                    }
                    jcenter()
                    }
                    dependencies {`enter code here`
                    classpath 'com.android.tools.build:gradle:3.1.2'
                    }
                    }





                    share|improve this answer




























                      14












                      14








                      14







                      This is just a bug in the Gradle file located at C:flutterpackagesflutter_toolsgradleflutter.gradle at line 25.



                      All you have to do is just edit this file by moving it to the top:



                      maven {
                      url 'https://dl.google.com/dl/android/maven2'
                      }


                      Change from this



                      buildscript {
                      repositories {

                      jcenter()
                      maven {
                      url 'https://dl.google.com/dl/android/maven2'
                      }
                      }
                      dependencies {
                      classpath 'com.android.tools.build:gradle:3.1.2'
                      }
                      }


                      to this:



                      buildscript {
                      repositories {
                      maven {
                      url 'https://dl.google.com/dl/android/maven2'
                      }
                      jcenter()
                      }
                      dependencies {`enter code here`
                      classpath 'com.android.tools.build:gradle:3.1.2'
                      }
                      }





                      share|improve this answer















                      This is just a bug in the Gradle file located at C:flutterpackagesflutter_toolsgradleflutter.gradle at line 25.



                      All you have to do is just edit this file by moving it to the top:



                      maven {
                      url 'https://dl.google.com/dl/android/maven2'
                      }


                      Change from this



                      buildscript {
                      repositories {

                      jcenter()
                      maven {
                      url 'https://dl.google.com/dl/android/maven2'
                      }
                      }
                      dependencies {
                      classpath 'com.android.tools.build:gradle:3.1.2'
                      }
                      }


                      to this:



                      buildscript {
                      repositories {
                      maven {
                      url 'https://dl.google.com/dl/android/maven2'
                      }
                      jcenter()
                      }
                      dependencies {`enter code here`
                      classpath 'com.android.tools.build:gradle:3.1.2'
                      }
                      }






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 17 '18 at 9:51









                      Peter Mortensen

                      13.7k1986113




                      13.7k1986113










                      answered Oct 26 '18 at 14:08









                      CharlesCharles

                      15611




                      15611























                          6














                          This is related to Flutter 0.9.4 at the moment. It will be fixed in the next release. In the meantime, you can update Flutter manually by running the commands described in "Flutter Upgrade". Basically they involve the following:





                          1. Change the Flutter GitHub channel to master by running on the command prompt:



                            flutter channel master



                          2. Upgrade Flutter itself by running



                            flutter upgrade



                          Once the upgrade is done, run the test drive application, and it should compile successfully.






                          share|improve this answer


























                          • You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

                            – cesards
                            Nov 3 '18 at 17:43











                          • This is working for me tried almost all solutions

                            – Pratik Mohanrao Gondil
                            Dec 3 '18 at 6:54


















                          6














                          This is related to Flutter 0.9.4 at the moment. It will be fixed in the next release. In the meantime, you can update Flutter manually by running the commands described in "Flutter Upgrade". Basically they involve the following:





                          1. Change the Flutter GitHub channel to master by running on the command prompt:



                            flutter channel master



                          2. Upgrade Flutter itself by running



                            flutter upgrade



                          Once the upgrade is done, run the test drive application, and it should compile successfully.






                          share|improve this answer


























                          • You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

                            – cesards
                            Nov 3 '18 at 17:43











                          • This is working for me tried almost all solutions

                            – Pratik Mohanrao Gondil
                            Dec 3 '18 at 6:54
















                          6












                          6








                          6







                          This is related to Flutter 0.9.4 at the moment. It will be fixed in the next release. In the meantime, you can update Flutter manually by running the commands described in "Flutter Upgrade". Basically they involve the following:





                          1. Change the Flutter GitHub channel to master by running on the command prompt:



                            flutter channel master



                          2. Upgrade Flutter itself by running



                            flutter upgrade



                          Once the upgrade is done, run the test drive application, and it should compile successfully.






                          share|improve this answer















                          This is related to Flutter 0.9.4 at the moment. It will be fixed in the next release. In the meantime, you can update Flutter manually by running the commands described in "Flutter Upgrade". Basically they involve the following:





                          1. Change the Flutter GitHub channel to master by running on the command prompt:



                            flutter channel master



                          2. Upgrade Flutter itself by running



                            flutter upgrade



                          Once the upgrade is done, run the test drive application, and it should compile successfully.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 17 '18 at 9:54









                          Peter Mortensen

                          13.7k1986113




                          13.7k1986113










                          answered Nov 1 '18 at 5:33









                          user3399299user3399299

                          612




                          612













                          • You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

                            – cesards
                            Nov 3 '18 at 17:43











                          • This is working for me tried almost all solutions

                            – Pratik Mohanrao Gondil
                            Dec 3 '18 at 6:54





















                          • You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

                            – cesards
                            Nov 3 '18 at 17:43











                          • This is working for me tried almost all solutions

                            – Pratik Mohanrao Gondil
                            Dec 3 '18 at 6:54



















                          You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

                          – cesards
                          Nov 3 '18 at 17:43





                          You don't actually need to update the project dependencies repositories, so this answer is the one! :-D

                          – cesards
                          Nov 3 '18 at 17:43













                          This is working for me tried almost all solutions

                          – Pratik Mohanrao Gondil
                          Dec 3 '18 at 6:54







                          This is working for me tried almost all solutions

                          – Pratik Mohanrao Gondil
                          Dec 3 '18 at 6:54













                          4














                          Solution:



                          Put
                          maven {
                          url 'https://dl.google.com/dl/android/maven2'
                          }
                          at the top of:
                          jcenter()


                          in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :
                          The file is in the Flutter SDK.






                          share|improve this answer


























                          • HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

                            – vijju
                            Nov 12 '18 at 6:55











                          • You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

                            – Aegon
                            Nov 12 '18 at 11:22


















                          4














                          Solution:



                          Put
                          maven {
                          url 'https://dl.google.com/dl/android/maven2'
                          }
                          at the top of:
                          jcenter()


                          in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :
                          The file is in the Flutter SDK.






                          share|improve this answer


























                          • HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

                            – vijju
                            Nov 12 '18 at 6:55











                          • You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

                            – Aegon
                            Nov 12 '18 at 11:22
















                          4












                          4








                          4







                          Solution:



                          Put
                          maven {
                          url 'https://dl.google.com/dl/android/maven2'
                          }
                          at the top of:
                          jcenter()


                          in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :
                          The file is in the Flutter SDK.






                          share|improve this answer















                          Solution:



                          Put
                          maven {
                          url 'https://dl.google.com/dl/android/maven2'
                          }
                          at the top of:
                          jcenter()


                          in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :
                          The file is in the Flutter SDK.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 25 '18 at 13:02









                          Peter Mortensen

                          13.7k1986113




                          13.7k1986113










                          answered Nov 5 '18 at 19:37









                          AegonAegon

                          793




                          793













                          • HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

                            – vijju
                            Nov 12 '18 at 6:55











                          • You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

                            – Aegon
                            Nov 12 '18 at 11:22





















                          • HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

                            – vijju
                            Nov 12 '18 at 6:55











                          • You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

                            – Aegon
                            Nov 12 '18 at 11:22



















                          HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

                          – vijju
                          Nov 12 '18 at 6:55





                          HII Aegon. I didn't find any flutter SDK. Where to find it. I have the same error?

                          – vijju
                          Nov 12 '18 at 6:55













                          You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

                          – Aegon
                          Nov 12 '18 at 11:22







                          You have to download the SDK first, here is a doc explains installation. flutter.io/docs/get-started/install

                          – Aegon
                          Nov 12 '18 at 11:22













                          3














                          this fixed my issue,SO reference here:



                          In your root build.gradle make sure google() is before jcenter().



                          repositories {
                          google()
                          jcenter()
                          }


                          In most projects you will have to update this in 2 spots.



                          buildscript {
                          repositories {
                          google()
                          jcenter()
                          }

                          }

                          allprojects {
                          repositories {
                          google()
                          jcenter()
                          }
                          }





                          share|improve this answer




























                            3














                            this fixed my issue,SO reference here:



                            In your root build.gradle make sure google() is before jcenter().



                            repositories {
                            google()
                            jcenter()
                            }


                            In most projects you will have to update this in 2 spots.



                            buildscript {
                            repositories {
                            google()
                            jcenter()
                            }

                            }

                            allprojects {
                            repositories {
                            google()
                            jcenter()
                            }
                            }





                            share|improve this answer


























                              3












                              3








                              3







                              this fixed my issue,SO reference here:



                              In your root build.gradle make sure google() is before jcenter().



                              repositories {
                              google()
                              jcenter()
                              }


                              In most projects you will have to update this in 2 spots.



                              buildscript {
                              repositories {
                              google()
                              jcenter()
                              }

                              }

                              allprojects {
                              repositories {
                              google()
                              jcenter()
                              }
                              }





                              share|improve this answer













                              this fixed my issue,SO reference here:



                              In your root build.gradle make sure google() is before jcenter().



                              repositories {
                              google()
                              jcenter()
                              }


                              In most projects you will have to update this in 2 spots.



                              buildscript {
                              repositories {
                              google()
                              jcenter()
                              }

                              }

                              allprojects {
                              repositories {
                              google()
                              jcenter()
                              }
                              }






                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Dec 4 '18 at 18:05









                              Muahmmad TayyibMuahmmad Tayyib

                              219115




                              219115























                                  2














                                  Flutter Master Upgrade



                                  I just had this problem. The fix for me however was a lot simpler. After switching branches to dev and upgrading, I switched back to master and it worked perfectly fine.



                                  flutter checkout dev
                                  flutter upgrade


                                  Then switch back



                                  flutter checkout master
                                  flutter upgrade
                                  flutter run





                                  share|improve this answer






























                                    2














                                    Flutter Master Upgrade



                                    I just had this problem. The fix for me however was a lot simpler. After switching branches to dev and upgrading, I switched back to master and it worked perfectly fine.



                                    flutter checkout dev
                                    flutter upgrade


                                    Then switch back



                                    flutter checkout master
                                    flutter upgrade
                                    flutter run





                                    share|improve this answer




























                                      2












                                      2








                                      2







                                      Flutter Master Upgrade



                                      I just had this problem. The fix for me however was a lot simpler. After switching branches to dev and upgrading, I switched back to master and it worked perfectly fine.



                                      flutter checkout dev
                                      flutter upgrade


                                      Then switch back



                                      flutter checkout master
                                      flutter upgrade
                                      flutter run





                                      share|improve this answer















                                      Flutter Master Upgrade



                                      I just had this problem. The fix for me however was a lot simpler. After switching branches to dev and upgrading, I switched back to master and it worked perfectly fine.



                                      flutter checkout dev
                                      flutter upgrade


                                      Then switch back



                                      flutter checkout master
                                      flutter upgrade
                                      flutter run






                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Nov 25 '18 at 13:01









                                      Peter Mortensen

                                      13.7k1986113




                                      13.7k1986113










                                      answered Nov 4 '18 at 4:19









                                      tdmillertdmiller

                                      1521112




                                      1521112























                                          2














                                          Just try to upgrade Flutter using the following:



                                          flutter upgrade 


                                          (This issue has been fixed in the latest update.)






                                          share|improve this answer






























                                            2














                                            Just try to upgrade Flutter using the following:



                                            flutter upgrade 


                                            (This issue has been fixed in the latest update.)






                                            share|improve this answer




























                                              2












                                              2








                                              2







                                              Just try to upgrade Flutter using the following:



                                              flutter upgrade 


                                              (This issue has been fixed in the latest update.)






                                              share|improve this answer















                                              Just try to upgrade Flutter using the following:



                                              flutter upgrade 


                                              (This issue has been fixed in the latest update.)







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Nov 25 '18 at 13:02









                                              Peter Mortensen

                                              13.7k1986113




                                              13.7k1986113










                                              answered Nov 8 '18 at 17:56









                                              Niyas AliNiyas Ali

                                              213




                                              213























                                                  1














                                                  All the previous answers resolve the problem. One comment to add is the location of the flutte.gradle.



                                                  You will find it in the directory that you installed Flutter in for the first time and not on the Flutter project.






                                                  share|improve this answer






























                                                    1














                                                    All the previous answers resolve the problem. One comment to add is the location of the flutte.gradle.



                                                    You will find it in the directory that you installed Flutter in for the first time and not on the Flutter project.






                                                    share|improve this answer




























                                                      1












                                                      1








                                                      1







                                                      All the previous answers resolve the problem. One comment to add is the location of the flutte.gradle.



                                                      You will find it in the directory that you installed Flutter in for the first time and not on the Flutter project.






                                                      share|improve this answer















                                                      All the previous answers resolve the problem. One comment to add is the location of the flutte.gradle.



                                                      You will find it in the directory that you installed Flutter in for the first time and not on the Flutter project.







                                                      share|improve this answer














                                                      share|improve this answer



                                                      share|improve this answer








                                                      edited Nov 17 '18 at 9:52









                                                      Peter Mortensen

                                                      13.7k1986113




                                                      13.7k1986113










                                                      answered Oct 31 '18 at 15:03









                                                      Mohamed DernounMohamed Dernoun

                                                      1514




                                                      1514























                                                          1














                                                          I also newbie in flutter and just installed it today. And I found the same problem as you, but after three hours googling I finally solved it.



                                                          The steps I have done are as follows:




                                                          1. Copy "flutter.gradle" file from "https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle" into "C:flutterpackagesgradle"



                                                          2. Then modify the content, for this part:



                                                            buildscript {
                                                            repositories {
                                                            google()
                                                            jcenter()
                                                            }
                                                            dependencies {
                                                            classpath 'com.android.tools.build:gradle:3.2.1'
                                                            }
                                                            }


                                                            to:



                                                            buildscript {
                                                            repositories {
                                                            maven {
                                                            url 'https://dl.google.com/dl/android/maven2'
                                                            }
                                                            jcenter()
                                                            }
                                                            dependencies {
                                                            classpath 'com.android.tools.build:gradle:3.2.1'
                                                            }
                                                            }



                                                          3. In "c:flutterbin", run this command:



                                                            flutter channel master


                                                            Wait until finished, and then run this command:



                                                            flutter upgrade


                                                          4. Wait until it finished, then re-run the project to debug,



                                                          5. and finally the application appeared on the emulator screen.



                                                            Picture finally running








                                                          share|improve this answer






























                                                            1














                                                            I also newbie in flutter and just installed it today. And I found the same problem as you, but after three hours googling I finally solved it.



                                                            The steps I have done are as follows:




                                                            1. Copy "flutter.gradle" file from "https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle" into "C:flutterpackagesgradle"



                                                            2. Then modify the content, for this part:



                                                              buildscript {
                                                              repositories {
                                                              google()
                                                              jcenter()
                                                              }
                                                              dependencies {
                                                              classpath 'com.android.tools.build:gradle:3.2.1'
                                                              }
                                                              }


                                                              to:



                                                              buildscript {
                                                              repositories {
                                                              maven {
                                                              url 'https://dl.google.com/dl/android/maven2'
                                                              }
                                                              jcenter()
                                                              }
                                                              dependencies {
                                                              classpath 'com.android.tools.build:gradle:3.2.1'
                                                              }
                                                              }



                                                            3. In "c:flutterbin", run this command:



                                                              flutter channel master


                                                              Wait until finished, and then run this command:



                                                              flutter upgrade


                                                            4. Wait until it finished, then re-run the project to debug,



                                                            5. and finally the application appeared on the emulator screen.



                                                              Picture finally running








                                                            share|improve this answer




























                                                              1












                                                              1








                                                              1







                                                              I also newbie in flutter and just installed it today. And I found the same problem as you, but after three hours googling I finally solved it.



                                                              The steps I have done are as follows:




                                                              1. Copy "flutter.gradle" file from "https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle" into "C:flutterpackagesgradle"



                                                              2. Then modify the content, for this part:



                                                                buildscript {
                                                                repositories {
                                                                google()
                                                                jcenter()
                                                                }
                                                                dependencies {
                                                                classpath 'com.android.tools.build:gradle:3.2.1'
                                                                }
                                                                }


                                                                to:



                                                                buildscript {
                                                                repositories {
                                                                maven {
                                                                url 'https://dl.google.com/dl/android/maven2'
                                                                }
                                                                jcenter()
                                                                }
                                                                dependencies {
                                                                classpath 'com.android.tools.build:gradle:3.2.1'
                                                                }
                                                                }



                                                              3. In "c:flutterbin", run this command:



                                                                flutter channel master


                                                                Wait until finished, and then run this command:



                                                                flutter upgrade


                                                              4. Wait until it finished, then re-run the project to debug,



                                                              5. and finally the application appeared on the emulator screen.



                                                                Picture finally running








                                                              share|improve this answer















                                                              I also newbie in flutter and just installed it today. And I found the same problem as you, but after three hours googling I finally solved it.



                                                              The steps I have done are as follows:




                                                              1. Copy "flutter.gradle" file from "https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle" into "C:flutterpackagesgradle"



                                                              2. Then modify the content, for this part:



                                                                buildscript {
                                                                repositories {
                                                                google()
                                                                jcenter()
                                                                }
                                                                dependencies {
                                                                classpath 'com.android.tools.build:gradle:3.2.1'
                                                                }
                                                                }


                                                                to:



                                                                buildscript {
                                                                repositories {
                                                                maven {
                                                                url 'https://dl.google.com/dl/android/maven2'
                                                                }
                                                                jcenter()
                                                                }
                                                                dependencies {
                                                                classpath 'com.android.tools.build:gradle:3.2.1'
                                                                }
                                                                }



                                                              3. In "c:flutterbin", run this command:



                                                                flutter channel master


                                                                Wait until finished, and then run this command:



                                                                flutter upgrade


                                                              4. Wait until it finished, then re-run the project to debug,



                                                              5. and finally the application appeared on the emulator screen.



                                                                Picture finally running









                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Nov 25 '18 at 12:59









                                                              Peter Mortensen

                                                              13.7k1986113




                                                              13.7k1986113










                                                              answered Nov 3 '18 at 13:06









                                                              Mohamad Yadi MulyadiMohamad Yadi Mulyadi

                                                              191




                                                              191























                                                                  1














                                                                  For me, opening the gradle-wrapper.properties file and editing the below line like this version solved it:



                                                                  distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






                                                                  share|improve this answer






























                                                                    1














                                                                    For me, opening the gradle-wrapper.properties file and editing the below line like this version solved it:



                                                                    distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






                                                                    share|improve this answer




























                                                                      1












                                                                      1








                                                                      1







                                                                      For me, opening the gradle-wrapper.properties file and editing the below line like this version solved it:



                                                                      distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






                                                                      share|improve this answer















                                                                      For me, opening the gradle-wrapper.properties file and editing the below line like this version solved it:



                                                                      distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip







                                                                      share|improve this answer














                                                                      share|improve this answer



                                                                      share|improve this answer








                                                                      edited Nov 25 '18 at 13:04









                                                                      Peter Mortensen

                                                                      13.7k1986113




                                                                      13.7k1986113










                                                                      answered Nov 25 '18 at 6:14









                                                                      user1182364user1182364

                                                                      33125




                                                                      33125























                                                                          1














                                                                          When I encountered this error Flutter 1.0 had been released. The previous issues were fixed and still I was getting the same error.



                                                                          The following steps fixed it for me :



                                                                          1) Changing Gradle plugin version from 3.1.2 to 3.2.1 in your_project/android/build.gradle inside 'dependencies' section -



                                                                          dependencies {
                                                                          classpath 'com.android.tools.build:gradle:3.2.1'
                                                                          }


                                                                          2) Changing Gradle wrapper version from 4.4 to 4.6 in your_project/android/gradle/wrapper/gradle-wrapper.properties like so



                                                                          distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip





                                                                          share|improve this answer




























                                                                            1














                                                                            When I encountered this error Flutter 1.0 had been released. The previous issues were fixed and still I was getting the same error.



                                                                            The following steps fixed it for me :



                                                                            1) Changing Gradle plugin version from 3.1.2 to 3.2.1 in your_project/android/build.gradle inside 'dependencies' section -



                                                                            dependencies {
                                                                            classpath 'com.android.tools.build:gradle:3.2.1'
                                                                            }


                                                                            2) Changing Gradle wrapper version from 4.4 to 4.6 in your_project/android/gradle/wrapper/gradle-wrapper.properties like so



                                                                            distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip





                                                                            share|improve this answer


























                                                                              1












                                                                              1








                                                                              1







                                                                              When I encountered this error Flutter 1.0 had been released. The previous issues were fixed and still I was getting the same error.



                                                                              The following steps fixed it for me :



                                                                              1) Changing Gradle plugin version from 3.1.2 to 3.2.1 in your_project/android/build.gradle inside 'dependencies' section -



                                                                              dependencies {
                                                                              classpath 'com.android.tools.build:gradle:3.2.1'
                                                                              }


                                                                              2) Changing Gradle wrapper version from 4.4 to 4.6 in your_project/android/gradle/wrapper/gradle-wrapper.properties like so



                                                                              distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip





                                                                              share|improve this answer













                                                                              When I encountered this error Flutter 1.0 had been released. The previous issues were fixed and still I was getting the same error.



                                                                              The following steps fixed it for me :



                                                                              1) Changing Gradle plugin version from 3.1.2 to 3.2.1 in your_project/android/build.gradle inside 'dependencies' section -



                                                                              dependencies {
                                                                              classpath 'com.android.tools.build:gradle:3.2.1'
                                                                              }


                                                                              2) Changing Gradle wrapper version from 4.4 to 4.6 in your_project/android/gradle/wrapper/gradle-wrapper.properties like so



                                                                              distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip






                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Feb 8 at 7:15









                                                                              HarisewakHarisewak

                                                                              440515




                                                                              440515






























                                                                                  draft saved

                                                                                  draft discarded




















































                                                                                  Thanks for contributing an answer to Stack Overflow!


                                                                                  • Please be sure to answer the question. Provide details and share your research!

                                                                                  But avoid



                                                                                  • Asking for help, clarification, or responding to other answers.

                                                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                                                  To learn more, see our tips on writing great answers.




                                                                                  draft saved


                                                                                  draft discarded














                                                                                  StackExchange.ready(
                                                                                  function () {
                                                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52945041%2fcouldnt-locate-lint-gradle-api-26-1-2-jar-for-flutter-project%23new-answer', 'question_page');
                                                                                  }
                                                                                  );

                                                                                  Post as a guest















                                                                                  Required, but never shown





















































                                                                                  Required, but never shown














                                                                                  Required, but never shown












                                                                                  Required, but never shown







                                                                                  Required, but never shown

































                                                                                  Required, but never shown














                                                                                  Required, but never shown












                                                                                  Required, but never shown







                                                                                  Required, but never shown







                                                                                  Popular posts from this blog

                                                                                  Costa Masnaga

                                                                                  Fotorealismo

                                                                                  Sidney Franklin