gpt4 book ai didi

flutter - 无法解析配置 ':app:debugRuntimeClasspath' 的所有文件。, flutter

转载 作者:行者123 更新时间:2023-12-03 05:04:10 31 4
gpt4 key购买 nike

我不知道是什么导致了 flutter 中的这个错误,我只是尝试创建一个新项目,但我收到了这个错误,我已经升级并降级了我的 flutter SDK 仍然出现同样的错误,当我执行 flutter run 时,这是完整的错误:

Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Running Gradle task 'assembleDebug'...

Running Gradle task 'assembleDebug'...
* What went wrong:
Running Gradle task 'assembleDebug'...
Execution failed for task ':app:checkDebugDuplicateClasses'.
Running Gradle task 'assembleDebug'...
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Running Gradle task 'assembleDebug'...
> Failed to transform artifact 'savedstate.aar (androidx.savedstate:savedstate:1.0.0)' to match attributes {artifactType=android-classes, org.gradle.usage=java-runtime}.
Running Gradle task 'assembleDebug'...
> org.gradle.api.UncheckedIOException: Failed to create directory 'C:\Users\<myPCname>\.gradle\caches\transforms-2\files-2.1\0e6d0f8153e855bafef0a18ed5b156d5'
Running Gradle task 'assembleDebug'...

Running Gradle task 'assembleDebug'...
* Try:
Running Gradle task 'assembleDebug'...
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.
Running Gradle task 'assembleDebug'...

Running Gradle task 'assembleDebug'...
* Get more help at https://help.gradle.org
Running Gradle task 'assembleDebug'...

Running Gradle task 'assembleDebug'...
BUILD FAILED in 16m 26s
Running Gradle task 'assembleDebug'...

Running Gradle task 'assembleDebug'... Done 1010.3s (!)
Exception: Gradle task assembleDebug failed with exit code 1

最佳答案

我只是通过更改来解决它:

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'

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

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
我的项目成功了,没有任何问题

关于flutter - 无法解析配置 ':app:debugRuntimeClasspath' 的所有文件。, flutter ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62331085/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com