qreate/spotify-playback-flutter

Issue with Kotlin version requirements when using the plugin in Flutter project

Closed this issue · 7 comments

Describe the bug
There is a mismatch in version requirements when using this pub package in a new Flutter project.

Expected behaviour
This Flutter package should work out of the box when creating a new project

Smartphone (please complete the following information):

  • Device: ALL
  • OS: Android
  • Browser [e.g. stock browser, safari]
  • Version 0.0.4

Additional context
This is an issue created for the problem found in #14

FYI, here's the full error I'm seeing in the console:

FAILURE: Build failed with an exception.

  • What went wrong:
    The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
    The following dependencies do not satisfy the required version:
    project ':spotify_playback' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.51

I resolved this by updating kotlin version to 1.3.21 in the spotify_playback plugin
ext.kotlin_version = '1.3.21'

I also had to switch to jdk8:

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

However, now I'm seeing this build error:

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:preDebugBuild'.
    Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
    Could not find :spotify-app-remote-release-0.6.1:.
    Searched in the following locations: file:/Users/zacw/code/songfoo/songfoo_client/android/app/libs/spotify-app-remote-release-0.6.1.aar
    Required by:
    project :app > project :spotify_playback

FYI, Copying the file manually into my project's local android/app/libs directory resolved the build issue.

Created a pull for this, will merge in a bit #18.

If you still have this issue please reopen the issue.

Hi @Joran-Dob I update the plugin and keep showing the error
project ':spotify_playback' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.51

@oscarshaitan could you please provide the full log! I think this is related to the kotlin issue (#18) which is closed and fixed but I did not do an update yet on pub I will do that in an bit 😊

Published a new version on pub, should resolve this issue. See version 0.0.7