gradle - JetifyTransform Flutter 运行执行失败
问题描述
FAILURE: Build failed with an exception.
出了什么问题:任务':app:compileDebugKotlin'执行失败。
无法解析配置“:app:debugCompileClasspath”的所有工件。无法转换工件“x86_debug.jar (io.flutter:x86_debug:1.0.0-77c5812d48b861225ea629bd813ad502ddf2c89c)”以匹配属性 {artifactType=android-classes, org.gradle.usage=java-runtime-jars}。Execution failed for JetifyTransform: C:\Users\Parth.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-77c5812d48b861225ea629bd813ad502ddf2c89c\d987fc036069ac9d7bfec6a441e0c6ca9e6d8467\x86_debug-1.0.0-77c5812d48b861225ea629bd813ad502ddf2c89c.jar. Failed to transform 'C:\Users\Parth.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-77c5812d48b861225ea629bd813ad502ddf2c89c\d987fc036069ac9d7bfec6a441e0c6ca9e6d8467\x86_debug-1.0.0-77c5812d48b861225ea629bd813ad502ddf2c89c.jar' using Jetifier. 原因:无效的距离代码。
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
在https://help.gradle.org获得更多帮助
在 22 秒内构建失败 Gradle 任务 assembleDebug 失败,退出代码为 1 退出(sigterm)
解决方案
我有类似的错误,我将 chekReleaseBuilds false 添加到 gradle 文件中,如下所示:
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false //added this line to the build.gradle under the
/android/app/build.gradle
}
这行得通。
推荐阅读
- flutter - 颤振的 DefaultTabBarController
- php - WP 5.1 编辑/新帖子/页面显示空白屏幕
- apache-spark - 为火花数据框中两列中的一对值的组合创建唯一 id
- python - TAB 键在我的 PYQT5 和 Python 代码中不起作用
- javascript - 如何检查 webpack 合并的输出
- php - 显示数据库内容
- android - 为什么我在 Android 中收到“无法暂停活动 IllegalStateException:必须仅在所有者初始化阶段创建重启器”?
- firebase - 向 Firestore 添加数据时如何避免不一致?
- elixir - 作为参数的函数——这里发生了什么?
- python - 如何将字符串作为对象名称传递?