'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 :
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
Solution 1:[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
Solution 2:[2]
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. 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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | iknow |
Solution 2 | Tuba Bozan |