简体   繁体   English

当我运行代码 gradle 任务需要太长时间时,我的 flutter 应用程序出现问题 我尝试了 flutter 医生,它说一切都正确,然后错误

[英]i have problem with my flutter app when i run the code gradle task takes too long i tried flutter doctor ,it says that all things is right ,then error

Launching lib\main.dart on Android SDK built for x86 in debug mode...

Running Gradle task 'assembleDebug'...运行 Gradle 任务“assembleDebug”...

FAILURE: Build failed with an exception. FAILURE:构建失败并出现异常。

  • Where: Build file 'C:\Users\tyous\StudioProjects\untitled\android\app\build.gradle' line: 24其中:构建文件 'C:\Users\tyous\StudioProjects\untitled\android\app\build.gradle' 行:24

  • What went wrong: A problem occurred evaluating project ':app'.出了什么问题:评估项目“:app”时出现问题。

Failed to apply plugin 'com.android.internal.version-check'.无法应用插件“com.android.internal.version-check”。 Could not create plugin of type 'VersionCheckPlugin'.无法创建“VersionCheckPlugin”类型的插件。 > Could not generate a decorated class for type VersionCheckPlugin. > 无法为 VersionCheckPlugin 类型生成修饰的 class。 > Lcom/android/ide/common/repository/GradleVersion; > Lcom/android/ide/common/repository/GradleVersion;

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志 output。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

BUILD FAILED in 3m 51s Exception: Gradle task assembleDebug failed with exit code 1 BUILD FAILED in 3m 51s Exception: Gradle task assembleDebug failed with exit code 1

Just wait for some time, if you code is right, it will run on your Virtual Emulator soon.稍等片刻,如果你的代码是正确的,它很快就会在你的虚拟模拟器上运行。 Android Studio does take time to load and personally lags on my PC if I am doing something simultaneously.如果我同时做某事,Android Studio 确实需要时间来加载并且个人滞后于我的 PC。

I recommend you to connect your personal device in Android Studio.我建议您在 Android Studio 中连接您的个人设备。 It might give you quicker results.它可能会给你更快的结果。

Coming back to your error, does this help?回到你的错误,这有帮助吗? Android Studio - Failed to apply plugin [id 'com.android.application'] Android Studio - 无法应用插件 [id 'com.android.application']

if you run the first time it will download the grandle documentation.如果您第一次运行,它将下载 Grandle 文档。 after that it wont take a long time之后不会花很长时间

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在我运行 flutter 项目时修复“已完成错误:Gradle 任务 assembleDebug 失败,退出代码 -1”错误 - How to fix “Finished with error: Gradle task assembleDebug failed with exit code -1” error when i run flutter project 当我想在 Flutter 中调试我的应用程序时遇到问题 - I have problem when I want debug my app in Flutter 当我尝试在 vs 代码中运行我的 flutter 时,它在调试控制台中给出了这个错误 - when I've tried to run my flutter in vs code it gave this error in debug console 我刚刚安装了 Flutter、Android Studio 和 VS CODE,但我只是无法获得 flutter 医生来消除以下错误- - I have just Installed Flutter, Android Studio, and VS CODE, but I just cant get flutter doctor to eliminate the following error- 当我尝试运行我的 Flutter 程序时,它会卡在“正在运行 Gradle 任务 'assembleDebug” - when ever I try to run my Flutter program, it gets stuck at “Running Gradle task 'assembleDebug” 我在我尝试过的 flutter 代码中遇到了这些错误(flutter clean - flutter pub get - flutter 升级 - 缓存修复)所有这些都不起作用 - I got these error in my flutter code I've tried (flutter clean - flutter pub get - flutter upgrade - cache repair) all of it didn't work 当我尝试在 Android 移动设备或模拟器中运行时,我的 Flutter 应用程序显示错误 - My Flutter Application is showing error when i tried to run in android mobile or an emulator 当我尝试创建 apk 时,Flutter 卡在“正在运行 Gradle 任务 'bundleRelease'...” - Flutter stuck at “Running Gradle task 'bundleRelease'…” when I tried to create an apk 由于 Gradle 错误,Flutter 运行无法正常工作。 尝试了所有解决方案,但没有奏效。 gradle 的问题 - Flutter run not working due to Gradle error. Tried all the solutions but not working. Problem with gradle 当我在真实设备上点击颤振运行时,在 VS Code 中显示错误 - flutter In VS Code show error when I hit flutter run on my real device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM