I am trying to follow this tutorial https://developer.spotify.com/technologies/spotify-android-sdk/tutorial/ in eclipse instead of Android Studio. I added the two jars and the aar file to libs directory. Still I am not able to import com.spotify.sdk.android.Spotify. Can someone let me know what am I missing?
-
1`aar` does not work in Eclipse, only in Android Studio. – nhaarman Aug 04 '14 at 20:11
-
Thank you. I want to know how I will be able to integrate Spotify SDK in eclipse then? – Durga Malleswari Aug 04 '14 at 20:21
2 Answers
If there isn't one available for you to download, you can typically do a conversion as specified here at this question in order to get the appropriate library structure that you need in order to accomplish the task.
Update:
Additionally, within the Eclipse environment it might be necessary to unselect this attribute within the IDE; “Force error when external jars contain native libraries”. This happens when a jar is distributed as a library but the .so files are in or expected in there. It really shouldn't cause an immediate error. So, you can unselect this from preferences and then it should get beyond an error such as this.

- 1
- 1

- 4,298
- 4
- 27
- 53
-
Thanks that helped. I got the jar file. But when I try to run the project I am getting this error on the console 'The library spotifysdk-player-1.0.0-beta1.jar contains native libraries that will not run on the device' – Durga Malleswari Aug 04 '14 at 21:07
-
@DurgaMalleswari Typically this is because there are .so files that the libraries also rely upon. If you were to find the .so files in there as well and add them to your libs/armeabi folder then hopefully the library will be capable of calling the functions in the native code that you are after. – Jay Snayder Aug 05 '14 at 12:29
-
-
I have another suggestion that at one point was modified within my own settings when dealing with native libraries and jar files. – Jay Snayder Aug 05 '14 at 18:19
You need to download the zip file from the following link on Github: 'https://github.com/spotify/android-sdk/releases'
Then you need to unzip it and import it as a project in Eclipse.

- 6,775
- 11
- 53
- 79
-
did you try to extract the jar file and add it to your project? – Michele La Ferla Aug 05 '14 at 06:44