8

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
1
  • 1
    Welcome to stackoverflow. You can use triple backticks to add code formatting. Like so: ``` code ```. This makes errors easier to read. Commented Jun 11, 2020 at 18:56

2 Answers 2

7

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

Sign up to request clarification or add additional context in comments.

Comments

-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. 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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.