brim-borium/spotify_sdk

Unresolved references in Android project

Opened this issue · 12 comments

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:

Running "flutter pub get" in client...
Launching lib/main.dart on Pixel 3a in debug mode...
 lib/main.dart
Note: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.1/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.14.2/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/BaseSpotifyApi.kt: (3, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/BaseSpotifyApi.kt: (6, 58): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (3, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (5, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (10, 42): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (20, 32): Unresolved reference: ImageUri
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (20, 52): Unresolved reference: Dimension
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (20, 77): Unresolved reference: it
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (21, 42): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyImagesApi.kt: (26, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (5, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (8, 42): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (30, 42): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (33, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (42, 42): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (46, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (56, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (68, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (80, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (90, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (101, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (114, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (125, 40): Unresolved reference: PlaybackSpeed
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (129, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (141, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (151, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (161, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (171, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (181, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (193, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyPlayerApi.kt: (203, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (5, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (6, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (7, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (8, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (9, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (10, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (11, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (108, 35): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (165, 36): Unresolved reference: ConnectionParams
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (170, 13): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (172, 13): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (173, 30): Unresolved reference: ConnectionListener
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (174, 25): 'onConnected' overrides nothing
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (174, 73): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (189, 25): 'onFailure' overrides nothing
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (196, 36): Unresolved reference: SpotifyDisconnectedException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (196, 69): Unresolved reference: SpotifyConnectionTerminatedException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (203, 36): Unresolved reference: CouldNotFindSpotifyApp
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (207, 36): Unresolved reference: AuthenticationFailedException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (211, 36): Unresolved reference: UserNotAuthorizedException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (215, 36): Unresolved reference: UnsupportedFeatureVersionException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (220, 36): Unresolved reference: OfflineModeException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (225, 36): Unresolved reference: NotLoggedInException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (229, 36): Unresolved reference: SpotifyRemoteServiceException
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (264, 27): Unresolved reference: AuthorizationRequest
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (264, 66): Unresolved reference: AuthorizationResponse
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (268, 13): Unresolved reference: AuthorizationClient
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (274, 13): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (302, 23): Unresolved reference: AuthorizationResponse
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (302, 47): Unresolved reference: AuthorizationClient
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (307, 13): Unresolved reference: AuthorizationResponse
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifySdkPlugin.kt: (310, 13): Unresolved reference: AuthorizationResponse
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (7, 40): Unresolved reference: SpotifyAppRemote
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (20, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (32, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (43, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (44, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (53, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/SpotifyUserApi.kt: (54, 41): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/CapabilitiesChannel.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/CapabilitiesChannel.kt: (5, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/CapabilitiesChannel.kt: (8, 48): Unresolved reference: UserApi
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/CapabilitiesChannel.kt: (14, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/CapabilitiesChannel.kt: (17, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerContextChannel.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerContextChannel.kt: (7, 51): Unresolved reference: PlayerApi
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerContextChannel.kt: (13, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerContextChannel.kt: (16, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerStateChannel.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerStateChannel.kt: (7, 49): Unresolved reference: PlayerApi
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerStateChannel.kt: (13, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/PlayerStateChannel.kt: (16, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/UserStatusChannel.kt: (4, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/UserStatusChannel.kt: (5, 12): Unresolved reference: spotify
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/UserStatusChannel.kt: (8, 46): Unresolved reference: UserApi
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/UserStatusChannel.kt: (14, 21): Cannot infer a type for this parameter. Please specify it explicitly.
e: /usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/hosted/pub.dartlang.org/spotify_sdk-1.0.0/android/src/main/kotlin/de/minimalme/spotify_sdk/subscriptions/UserStatusChannel.kt: (17, 21): Cannot infer a type for this parameter. Please specify it explicitly.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spotify_sdk:compileDebugKotlin'.
> Compilation error. See log for more details

* 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 44s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Folder structure:
Screenshot 2020-11-19 at 07 49 45

settings.gradle:
Screenshot 2020-11-19 at 07 49 58

Even tried manually adding references to app/build.gradle incase that was the issue, but no difference:
Screenshot 2020-11-19 at 07 50 13

Desktop:
OSX 10.15.7

Smartphone:
Pixel 3a, Android 11

Flutter
1.24.0-7.0.pre

To follow up on this, I today tried the following steps:

  • Create a new, clean Flutter app
  • Add spotify-auth (1.2.3) and spotify-app-remote (0.7.1) in Android Studio to root /android project folder
  • To /android/app/build.gradle add:
dependencies {
    implementation project(':spotify-app-remote')
    implementation project(':spotify-auth')
    implementation "com.google.code.gson:gson:2.6.1"
}
  • Run Flutter app

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:

  • Use the SDK example project. Launch on Android to confirm is working fine
  • Open pubspec.yaml
  • Change spotify_sdk from local import path to spotify_sdk: '1.0.0'
  • flutter clean
  • Run

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, #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.