尝试运行由另一个开发人员构建的Flutter应用程序时出现问题



我一直收到同样的消息,我不知道如何解决这个问题。如有任何帮助,我们将不胜感激。

Launching libmain.dart on SM M315F in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_custom_dialog'.
> Could not load compiled classes for build file 'E:SDKFlutterflutter.pub-cachehostedpub.dartlang.orgflutter_custom_dialog-1.2.0androidbuild.gradle' from cache.

* 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 3s
Exception: Gradle task assembleDebug failed with exit code 1

这个路径基本上是我的Flutter SDK存储'E:SDKFlutterflutter.pub-cachehostedpub.dartlang.orgflutter_custom_dialog-1.2.0androidbuild.gradle'的地方

p.S:当选择Chrome作为调试选项时,该应用程序会运行,但不会在手机或模拟器上运行。有什么线索可以解释为什么会这样吗?

在您的build.gradle中,更改gradle版本。通过升级和降级进行检查,直到它与您的包兼容

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

试用3.5.0

最新更新