[英]Run a Flutter Project with Android Studio is not possible anymore
I startet my Flutter project via Android Studio for a while and i had no problem to code and to run this project from e AVD oder a physiical Device (via USB).我通过 Android Studio 启动了我的 Flutter 项目一段时间,我可以毫无问题地从 e AVD 或物理设备(通过 USB)进行编码和运行该项目。 One week ago, i had a problem because of JAVA_HOME.
一周前,由于 JAVA_HOME,我遇到了一个问题。 I could solved this problem but its still not possible to run this problem.
我可以解决这个问题,但仍然无法运行这个问题。 Bow i have this message when i try to run my project:
鞠躬,当我尝试运行我的项目时收到此消息:
Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'...在调试模式下为 x86 构建的 Android SDK 上启动 lib\main.dart... 运行 Gradle 任务 'assembleDebug'...
FAILURE: Build failed with an exception.失败:构建失败,出现异常。
What went wrong: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper出了什么问题:无法初始化 class org.codehaus.groovy.runtime.InvokerHelper
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. Run with --scan to get full insights.
使用 --info 或 --debug 选项运行以获取更多日志 output。使用 --scan 运行以获取完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获得更多帮助
BUILD FAILED in 1s Finished with error: Gradle task assembleDebug failed with exit code 1 BUILD FAILED in 1s Finished with error: Gradle 任务 assembleDebug 失败,退出代码为 1
What can i do?我能做什么?
1- project fence 1-项目围栏
2- select Android / gradle / wrapper / gradle-wrapper.properties 2- select Android / gradle / 包装器 / gradle-wrapper.properties
3- change the distributionUrl
line to https \: //services.gradle.org/distributions/gradle-6.3-all.zip
3-将
distributionUrl
行更改为https \: //services.gradle.org/distributions/gradle-6.3-all.zip
That solves your problem?那解决了你的问题?
They asked the same thing here他们在这里问同样的事情
https://stackoverflow.com/questions/35000729/android-studio-could-not-initialize-class-org-codehaus-groovy-runtime-invokerhel
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.