'Flutter Android build not generating in Mac
In Mac, I've setup Flutter in Android studio. When I'm running project it gives me error
* What went wrong:
Execution failed for task ':location:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
I'm using all latest versions of Flutter, Kotlin, Gradle etc.
Solution 1:[1]
You need to equalize kotlin version in first row which is ext.kotlin_version = '1.6.10'
to according to classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
of underlined $kotlin_version
After this, the problem will solve...
Solution 2:[2]
Actually I found a solution for my problem. There are 2 dependency defined in .yaml file 1. geo_location and 2. location.
After removing the location dependency from .yaml file and run command flutter pub get I can successfully build android build from Mac. This solution might not be global but solution of my problem I found this.
Thank you! Happy coding.
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 | Aldan |
Solution 2 | Jay Makwana |