flutter 引入 aar 包,运行报错,版本 3.38.9

5 天前
 Dnlyao
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 42s
Running Gradle task 'assembleDebug'... 163.2s
Error: Gradle task assembleDebug failed with exit code 1

不管使用 java ,或者 kotlin 都是显示失败,然后找不到 aar 依赖。而且在 android studio 打开文件,都是显示 import 找不到的。如何解决。
326 次点击
所在节点    Flutter
1 条回复
Dnlyao
3 天前
检查 android studio 设置的 jdk 版本和路径,然后升级 android studio 版本,旧版的 android studio 不支持高版本 gradle 。也换了个 aar 包。大致是这样解决了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1191253

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX