Open Runeii opened 3 years ago
To follow up on this, I today tried the following steps:
spotify-auth
(1.2.3) and spotify-app-remote
(0.7.1) in Android Studio to root /android
project folder/android/app/build.gradle
add:dependencies {
implementation project(':spotify-app-remote')
implementation project(':spotify-auth')
implementation "com.google.code.gson:gson:2.6.1"
}
Build still fails and throws same errors about unresolved references to spotify
/ SpotifyAppRemote
.
Have narrowed the cause down to a possible bad version on pub.dev
.
Reproduction:
pubspec.yaml
spotify_sdk
from local import path to spotify_sdk: '1.0.0'
flutter clean
Project will fail to run, throwing previously mentioned complaints about unresolved reference: spotify
Issue solved:
The package available from pub.dev
as 1.0.0
is missing the following lines from android/build.gradle
:
// -- spotify
implementation project(':spotify-auth')
implementation project(':spotify-app-remote')
Weirdly, I can't see any commit in the last 12 months where these weren't present, so not sure if something has gone wrong in the publishing process.
Regardless, for the time being, installing directly from master works:
pubspec.yml:
spotify_sdk:
git:
url: git://github.com/brim-borium/spotify_sdk.git
ref: master
@fightwithcrayon I just published a new version 1.0.2, do you still have the same issues with this version?
@brim-borium I am still facing the same issues with new version as well.
@fightwithcrayon I just published a new version 1.0.2, do you still have the same issues with this version?
Sorry, I'm not currently working with the SDK. Sounds like @Saurabh-Pandeyy, above, is facing it though.
@fightwithcrayon I am unable to add Spotify Auth 1.2.3 and Spotify App Remote 0.7.1, can you tell me how to import
HI @Nirmitjatana did you follow the instructions on how to add the modules from the readme? You can find a How-to for adding the modules here https://developer.spotify.com/documentation/android/quick-start/
HI @Nirmitjatana did you follow the instructions on how to add the modules from the readme? You can find a How-to for adding the modules here https://developer.spotify.com/documentation/android/quick-start/
@brim-borium Yeah I did, unfortunately after the new flutter update I am not to import .aar file as a module. I tried adding the files manually also, ran into some other errors.
There is no option anymore on android studio to import .jar/.aar files as a module in a flutter project anymore.
I will have a look at this and post my findings in the other ticket you opened, https://github.com/brim-borium/spotify_sdk/issues/99.
I think the issue in this thread is not part of you problem :)
I am getting this same issue and I am unable to solve this. Please guide me on how to solve this.
Describe the bug Adding
spotify_sdk
to a project seems to throw a lot of Unresolved Reference errors, even without actually having yet used imported the package in to my Flutter lib.This is using Spotify Auth 1.2.3 and Spotify App Remote 0.7.1 – both appear to be fully installed as expected (see images below).
Could be that I haven't setup my project correctly, but have retried a few times now and it seems following the steps in the documentation leads to this state.
Screenshots Full error output:
Folder structure:
settings.gradle
:Even tried manually adding references to
app/build.gradle
incase that was the issue, but no difference:Desktop: OSX 10.15.7
Smartphone: Pixel 3a, Android 11
Flutter 1.24.0-7.0.pre