- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Working with Android Studio 2022.2.1 Patch 2
Kotlin 2.1.6
I'm trying to add Spotify SDK to my Android App using this tutorial but it seems like it's old/deprecated and I'm getting errors no matter what I do.
First off I don't think adding a JAR/AAR as a module is supported in Android Studio anymore (at least not the way it's done in the tutorial) so what exactly is the module structure supposed to look like for spotify-app-remote? I ended up creating a spotify-app-remote module in the root directory and including the .aar file in the libs folder, and added these lines to app/build.gradle like the tutorial says:
implementation project(':spotify-app-remote')
implementation "com.google.code.gson:gson:2.6.1"
but I don't know if this is correct because I can't get past this step.
The next step has us import all this
import com.spotify.android.appremote.api.ConnectionParams;
import com.spotify.android.appremote.api.Connector;
import com.spotify.android.appremote.api.SpotifyAppRemote;
import com.spotify.protocol.client.Subscription;
import com.spotify.protocol.types.PlayerState;
import com.spotify.protocol.types.Track;
but I'm getting a module spotify not found error. I tried changing spotify to spotify_app_remote (the package name uses _ instead of -) but I get the same module not found error.
I also tried adding imports in app/build.gradle like this
implementation "com.spotify.android:auth:2.0.0"
implementation 'com.spotify.android.appremote:spotify-app-remote:1.2.0'
implementation 'com.spotify.protocol:spotify-protocol:0.7.2'
The first one gets rid of module spotify not found but then protocol and android are unrecognized. The last two lines break the build because I'm unable to find the correct version numbers anywhere.
I feel like I'm beating my head against a wall here, it would be super helpful if someone could walk me through the tutorial with a more updated version of Kotlin/android studio.
Solved! Go to Solution.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page