[英]Flutter App stuck on "app running gradle task 'assembledebug..."
This is my first flutter app I tried running the sample given by the flutter but it gets stuck on this message app running gradle task 'assembledebug....
or after sometime error Exception: Gradle task assembleDebug failed with exit code 1
appears. This is my first flutter app I tried running the sample given by the flutter but it gets stuck on this message app
running gradle task 'assembledebug....
or after sometime error Exception: Gradle task assembleDebug failed with exit code 1
appears. Tried doing all the things answered in similar questions.尝试做类似问题中回答的所有事情。 Using sdk version 30, Android studio ver 3.1 and flutter ver 1.20.1.
使用 sdk 版本 30、Android studio 版本 3.1 和 flutter 版本 1.20.1。
> Failed to transform artifact 'x86_debug.jar (io.flutter:x86_debug:1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54)' to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: C:\Users\dell\.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54\570a59b7be41f73458509975d3eefca7ad5561cf\x86_debug-1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54.jar.
> Failed to transform 'C:\Users\dell\.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54\570a59b7be41f73458509975d3eefca7ad5561cf\x86_debug-1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54.jar' using Jetifier. Reason: Unexpected end of ZLIB input stream. (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
have you tried a clean build with flutter clean
?您是否尝试过使用
flutter clean
进行干净构建? and could you also post more of your error and code?您还可以发布更多错误和代码吗?
Try to empty cache "C:\Users\dell.gradle\caches" and re-run the project.尝试清空缓存“C:\Users\dell.gradle\caches”并重新运行项目。 You should also check for Event log error when building the project.
您还应该在构建项目时检查事件日志错误。
In your android studio, cd to android directory then run from terminal: gradlew clean gradlew build and then run the application.在您的 android 工作室中,cd 到 android 目录,然后从终端运行: gradlew clean gradlew build 然后运行应用程序。 If it wont work try flutter clean.
如果它不起作用,请尝试清洁 flutter。 Also delete the.gradle folder in Users directory.
同时删除Users目录下的.gradle文件夹。 it will take some time but it will run.
这将需要一些时间,但它会运行。
Run跑
flutter run -v
so you can see which part is taking much time.所以你可以看到哪个部分花费了很多时间。 In my case it was
Downloading https://services.gradle.org/distributions/gradle-7.4-all.zip
if you have the same problem check this在我的情况下,它正在
Downloading https://services.gradle.org/distributions/gradle-7.4-all.zip
如果你有同样的问题检查这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.