Skip to content

Adding this plugin results in Build failed with an exception #141

@canewsin

Description

@canewsin

Describe the bug
Gradle Error : FAILURE: Build failed with an exception.

To Reproduce
Steps to reproduce the behavior

flutter create flutter_test
flutter pub add shared_storage
flutter build apk

Expected behavior
Build should succeed.

Additional context

Gradle log

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkReleaseDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)
dk8-1.5.32 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • 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.

BUILD FAILED in 6s

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions