brograming
[Flutter] spotify api <spotify sdk>사용하기 (1)spotify_sdk 플러그인 추가 본문
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'
