'Flutter app gradle build exception failure
I'm trying to run the sample app of Flutter in my emulator. However when I try to run (through Android Studio or through the command line) I get the following exception:
Finished with error: ProcessException: Process
"C:\android_projects\flutter_app\android\gradlew.bat" exited abnormally:
Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:34)
at
org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:25)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Command: C:\android_projects\flutter_app\android\gradlew.bat -v
When I run flutter doctor everything is fine and I also accepted all licenses.
Any help is welcome!
Solution 1:[1]
Taking a cue from @bnxm answer, I changed mine from
https\://services.gradle.org/distributions/gradle-6.7.x-all.zip to https\://services.gradle.org/distributions/gradle-6.5.x-all.zip
Basically, the idea is to downgrade it by some minor version number, just in case gradle latest release has gone past major version 6.xx.yy when you check this answer.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ercross |
