781flyingdutchman / background_downloader

Flutter plugin for file downloads and uploads
Other
152 stars 71 forks source link

Android build is failing due to missing Kotlin lib #350

Closed starfreck closed 1 month ago

starfreck commented 1 month ago

Describe the bug

Android build is failing due to missing Kotlin lib with the latest version of flutter. I am not a Gradle expert but as far as I can tell, It cannot find org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:1.7.10 in any of the artifactory.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade Flutter $ flutter upgrade
  2. Create new flutter project flutter create my_new_project
  3. Add background_downloader: ^8.5.2 as dependency
  4. Run flutter build apk

Expected behavior An apk file should be generated under build/app/outputs/flutter-apk/.

Logs

background_downloader: ^8.5.2
$ flutter --version
Flutter 3.22.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0850beeb2 (5 days ago) • 2024-07-16 21:43:41 -0700
Engine • revision 235db911ba
Tools • Dart 3.4.4 • DevTools 2.34.3
$ flutter build apk
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':background_downloader:compileReleaseKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':background_downloader:compileReleaseKotlin'.
   > Could not resolve all files for configuration ':background_downloader:kotlinCompilerPluginClasspathRelease'.
      > Could not find org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:1.7.10.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.7.10/kotlin-serialization-compiler-plugin-embeddable-1.7.10.pom
          - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.7.10/kotlin-serialization-compiler-plugin-embeddable-1.7.10.pom
          - https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.7.10/kotlin-serialization-compiler-plugin-embeddable-1.7.10.pom
          - https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.7.10/kotlin-serialization-compiler-plugin-embeddable-1.7.10.pom
        Required by:
            project :background_downloader

* 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

BUILD FAILED in 6s
Running Gradle task 'assembleRelease'...                            6.5s
Gradle task assembleRelease failed with exit code 1

Code N/A

Additional context N/A

781flyingdutchman commented 1 month ago

You have to upgrade Kotlin to 1.9.20