Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build is failing due to missing Kotlin lib #350

Closed
starfreck opened this issue Jul 22, 2024 · 1 comment
Closed

Android build is failing due to missing Kotlin lib #350

starfreck opened this issue Jul 22, 2024 · 1 comment

Comments

@starfreck
Copy link

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
Copy link
Owner

You have to upgrade Kotlin to 1.9.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants