Notice
Recent Posts
Recent Comments
Link
«   2026/03   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

brograming

[Flutter] spotify api <spotify sdk>사용하기 (1)spotify_sdk 플러그인 추가 본문

카테고리 없음

[Flutter] spotify api <spotify sdk>사용하기 (1)spotify_sdk 플러그인 추가

brograming 2024. 8. 5. 16:50

1. 의존성 추가

https://pub.dev/packages/spotify_sdk

 

spotify_sdk | Flutter package

A flutter plugin that let's you communicate with the spotify sdk and auth lib

pub.dev

  • pubspec.yaml에서 아래 코드와 같이 추가해주고 pub get을 실행해준다

 

 

2. 프로젝트에 수동으로 폴더를 만들고 x.x.x.aar파일 추가해준다

파일을 추가하지 않으면 

A problem occurred evaluating project ':spotify_sdk'. 
> Project with path ':spotify-app-remote' could not be found in project ':spotify_sdk'.

위 오류를 만나게 될 것이다

 

 

2-1. aar 파일 추가

https://github.com/spotify/android-sdk/releases

  • 위 링크에서 spotify-app-remote-release-x.x.x.aar파일을 다운한다

 

2-2. android에 spotify-app-remote폴더를 생성해주고 앞서 다운받은 aar파일을 넣어준다

 

 

2-3. build.gradle파일을 수동으로 만들고 안에 내용을 추가해준다

configurations.maybeCreate("default")
artifacts.add("default", file('spotify-app-remote-release-x.x.x.aar'))

 

 

2-4. adroid에 settings.gradle에 아래 코드 추가해준다

include ':spotify-app-remote'

3. pub get를 실행