How to Solve Install Gradle Issue In Flutter ??
When the user installs the flutter framework for the first time sometimes they might get the error. The error states about install Gradle issues in a flutter. So, in this article, we will learn about how to solve the install Gradle issue in a flutter.
How to Solve Install Gradle Issue In Flutter?
If you change the flutter channel to master, you’ll see that it will run normally. You can use the master channel for now and then switch it back to dev.
flutter channel master flutter upgrade # to see all the channels, run flutter channel
user have to edit $flutterRoot/packages/flutter_tools/gradle/flutter.gradle
buildscript { repositories { google() jcenter() maven { url 'https://dl.google.com/dl/android/maven2' } } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' } }
In the Gradle wrapper properties Gradle/wrapper/Gradle-wrapper.properties you may also have to change it to 4.6 or above.
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Users can also try the below way:
Open the root flutter folder in your computer, and open the Gradle folder in that root folder for example C:\flutter\package\flutter_tool\gradle and add ‘google()‘ to the build script. It fixed the issue for me. flutter root folder:
flutter root path
Add ‘google()’ in the buildscript:
BuildScript in Flutter
Conclusion:
Thanks for being with us !!!
So, in this article, we have been through how to solve install Gradle issues in a flutter.
Do not forget to drop us your suggestion/feedback to serve you better.
Flutter Agency is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.
Flutter Agency is one of the most popular online portals dedicated to Flutter Technology. Daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.