[英]Could not resolve all files for configuration ':app:debugRuntimeClasspath'., flutter
I don't know whats causing this error in flutter, I just tried to create a new project and I am getting this error, I have upgraded and also downgraded my flutter SDK still the same error keeps popping out when I do flutter run this is the full error:我不知道是什么导致了 flutter 中的这个错误,我刚刚尝试创建一个新项目,但我收到了这个错误,我已经升级并降级了我的 flutter SDK 当我执行 flutter 运行时仍然出现相同的错误这是完整的错误:
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
I simply solved it by changing:我只是通过更改解决了它:
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
to:到:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
and my project worked, without any more problems我的项目成功了,没有任何问题
I don't know whats causing this error in flutter, I just tried to create a new project and I am getting this error, I have upgraded and also downgraded my flutter SDK still the same error keeps popping out when I do flutter run this is the full error: I don't know whats causing this error in flutter, I just tried to create a new project and I am getting this error, I have upgraded and also downgraded my flutter SDK still the same error keeps popping out when I do flutter run this is完整的错误:
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
https://www.jitpack.io/com/github/agorabuilder/native-full-sdk/3.5.2/native-full-sdk-3.5.2.jar
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获得更多帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.