Spotify API Android ADK

Viewed 143

The SDK does not have a proper way to set up imports in android studio and is not recognized as a JAR. This leads to unusability. Is there a workaround for this to be used in android studio?

3 Answers

If you want to use .jar files, you need to add them into /libs folder. After that add the following code into dependencies section of build.gradle file:

implementation fileTree(include: ['*.jar'], dir: 'libs')

After sync process, Android Studio will recognize Spotify imports. Best regards.

Depending on which Spotify SDK library we're talking about you may need to add either of the following to the Gradle config:

Spotify App Remote

Be sure to check out their sample project. Not that this is an Aar, not a Jar.

implementation files('path/to/remote/lib/spotify-app-remote-release-<version>.aar')

Spotify Authentication Library

implementation "com.spotify.android:auth:<version>"

The issue is identified. It is not currently possible in Android Studio on Mac OS! Thank you for your help though!

Related