Flutter Android构建未在Mac中生成



在Mac中,我在Android工作室中安装了Flutter。当我运行项目时,它会给我错误

* 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

我正在使用所有最新版本的Flutter,Kotlin,Gradle等

您需要根据带下划线的$kotlin_versionclasspath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"来均衡第一行中的kotlin版本,即ext.kotlin_version = '1.6.10'

之后,问题就会解决。。。

实际上我找到了解决问题的方法。yaml文件1中定义了2个依赖项。geo_ location和2。地方

在从.yaml文件中删除位置依赖并运行命令flutter pub get之后,我可以成功地从Mac构建android。这个解决方案可能不是全球性的,但我发现了这个问题的解决方案。

谢谢!快乐的编码。

最新更新