作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图在 Debug模式下运行代码,并收到此错误。
Launching lib\main.dart on sdk gphone x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_plugin_android_lifecycle:javaPreCompileDebug'.
> Could not resolve all files for configuration ':flutter_plugin_android_lifecycle:debugCompileClasspath'.
> Failed to transform artifact 'flutter_embedding_debug.jar (io.flutter:flutter_embedding_debug:1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec)' to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Failed to transform 'C:\Users\SOLIC\.gradle\caches\modules-2\files-2.1\io.flutter\flutter_embedding_debug\1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec\b458081743a320c57c360e4b8260848b361cb59d\flutter_embedding_debug-1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec.jar' using Jetifier. Reason: invalid entry CRC (expected 0xc5a5fb23 but got 0x3162074). (Run with --stacktrace 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 19s
Exception: Gradle task assembleDebug failed with exit code 1
更多信息:
Please look into my github issue
最佳答案
第一种选择:
升级您的Flutter
flutter channel stable && flutter upgrade
然后使用以下命令清理flutter项目和所有缓存文件
flutter clean
然后运行flutter项目:
flutter run
第二种选择:
~/.gradle/gradle.properties
app/build.gradle
maven {
url 'http://download.flutter.io'
}
关于android - 任务 ':flutter_plugin_android_lifecycle:javaPreCompileDebug'的执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64258399/
我试图在 Debug模式下运行代码,并收到此错误。 Launching lib\main.dart on sdk gphone x86 in debug mode... FAILURE: Build
当我尝试运行该应用程序时,我收到此错误 Task 'assembleAarRelease' not found in root project 'flutter_plugin_android_life
我是一名优秀的程序员,十分优秀!