How to Run Gradle Build in Flutter? Last Updated : 11 Oct, 2022 Comments Improve Suggest changes Like Article Like Report Gradle is a tool that is used to automate tasks in android development. The Gradle build is one specific task that can be used to create APK files for your app. Often, the flutter run/build tasks don't work as desired, and in those cases, cleaning and building the Gradle again can be helpful. There are two methods to achieve this, Through command lineThrough manual methodRunning Gradle Build in Flutter through Command Line Open the terminal at the root of your flutter project. Then we'll need to cd into the android directory and run the command. You need to have JDK and JRE installed to run this. Note: If you get a path error, navigate and find your JRE, copy the Path, and open Environment Variables, then add it to the system path. Follow the steps given below Find the JRE path. It is usually in the same directory where you have the Android SDK installed.After copying that path, open Environment Variables by typing env in your search bar and click on Environment variables. We will add a new system variable. After this, click on the "New" button under the system variables section, and a prompt will open up. Then, name it JAVA_HOME and paste the copied JRE path in the variable value. After this, run the following commands from the root of your flutter app project. cd android ./gradlew clean build This will run the Gradle build process for you. You might see a few warnings, but they're fine as long as there's no error. Running Gradle Build in Flutter through the Manual Method You can also download the latest Gradle and replace it in the Gradle source location, Download the required Gradle version from this fast mirror https://distfiles.macports.org/gradle/Replace the .zip file in the Gradle source directory with the new file you downloaded. The source directory can be found in C:\Users\<username>\.gradle\wrapper\dists\<gradleversion>\<code> That's it. Now you can run the flutter run or build command with the new Gradle version. So that's how we can run Gradle build in flutter and debug our apps. Comment More infoAdvertise with us Next Article How to Generate SHA-1 Key in Flutter? A aakzsh Follow Improve Article Tags : Flutter Flutter Similar Reads How to Generate SHA-1 Key in Flutter? SHA-1(Secure Hash Algorithm) is the unique identity of your Application. In Flutter, you can use these keys for various purposes such as adding Firebase to your app, Google Maps API integration, and more. For example, to add Firebase to your app, you need to provide the SHA-1 and SHA-256 keys to the 2 min read How to Build Advance Quiz App in Flutter? This is a quiz app using Flutter and API. The working of this application is very simple, Â here we have two screens: screen one and screen two. Screen one is the stateless screen which means that it will not respond to any change on the screen. The second screen, is a stateful widget which means tha 9 min read How to Install Flutter in Eclipse? Flutter is a framework for building cross-platform applications (android, ios, web) which use Dart as its programming language. Before IDEs like Android Studio and VS code became popular, Eclipse used to be heavily used by developers. Now we can install dart inside our Eclipse IDE with the help of t 2 min read How to Add Multiple Markers on Google Map in Flutter? Google Maps is one of the popular apps used nowadays for navigation or locating markers on Google Maps. We have seen markers on Google Maps for various locations. In this article, we are going to see how to implement multiple markers on Google Maps in Flutter. Step By Step ImplementationStep 1: Crea 4 min read How to Draw Polygon on Google Maps in Flutter? Google Maps is used in many Android applications. We can use Polygons to represent routes or areas in Google Maps. So in this article, we are going to see how to Draw Polygon in Google Maps in Flutter. Step By Step ImplementationStep 1: Create a New Project in Android StudioTo set up Flutter Develop 4 min read How to Install Flutter on Linux? In this article, we will learn how to install Flutter in Linux Flutter is an open-source UI software development kit created by Google. It is used to develop cross-platform applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. Installing Flutter on L 2 min read Like