Flutter 错误 Transform‘s input file does not exist: ... artifacts/engine/android-arm/flutter.jar.

Posted 早起的年轻人

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter 错误 Transform‘s input file does not exist: ... artifacts/engine/android-arm/flutter.jar.相关的知识,希望对你有一定的参考价值。

Flutter 使用 fvm进行多版本管理后,运行项目出现异常:
Transform’s input file does not exist: /Users/androidlongs/fvm/versions/3.0.5/bin/cache/artifacts/engine/android-arm/flutter.jar

* What went wrong:
Execution failed for task ':live_flutter_plugin:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':live_flutter_plugin:debugCompileClasspath'.
   > Failed to transform flutter.jar to match attributes artifactType=android-classes-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime.
      > Execution failed for JetifyTransform: /Users/androidlongs/fvm/versions/3.0.5/bin/cache/artifacts/engine/android-arm/flutter.jar.
         > Transform's input file does not exist: /Users/androidlongs/fvm/versions/3.0.5/bin/cache/artifacts/engine/android-arm/flutter.jar. (See https://issuetracker.google.com/issues/158753935)

* 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.


打开指定路径查看发现确实没有 android-arm 这个目录:

解决方法 可以执行 flutter precache 命令来下载

flutter precache

以上是关于Flutter 错误 Transform‘s input file does not exist: ... artifacts/engine/android-arm/flutter.jar.的主要内容,如果未能解决你的问题,请参考以下文章

Flutter控件——容器控件:变换Transform

Flutter控件——容器控件:变换Transform

Flutter控件——容器控件:变换Transform

Flutter google_sign_in 错误:无法合并 dex

使用 Firebase 身份验证的 Flutter 应用程序中的 Google sign_in_failed 错误

如何修复此错误任务 'assembleAarRelease' not found in root project 'flutter_plugin_android_lifecycle'。?