-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notes on building project with gradlew #179
Comments
I followed your steps closely but when typing "gradle" I get the following error while building:
EDIT:
New Problem:when I run "gradlew", it says "build successfull", but I can't find an aar file in build/output (there isn't even a folder called output) and when I run "gradlew assemble" I get this error half way through:
|
Hi Finni!
Sorry you're having problems, this one is a tough nut to crack.
It looks like com.android.support.test:runner: is an XML file that lives in
the .idea/libraries directory of the project. I have no idea why it
wouldn't be there, but I am happy to try to troubleshoot that with you if
you'd like. Or I could send you my files. I could send you my compiled .aar
so you can add it as a dependency to your project, or I could send you my
whole project so you can see how I used it. What do you think?
…On Tue, May 5, 2020 at 3:40 PM Finni ***@***.***> wrote:
I followed your steps closely but when typing "gradle" I get the following
error while building:
`> A problem occurred configuring project ':spotify-api'.
Could not resolve all dependencies for configuration
':spotify-api:_debugAndroidTestCompile'.
> Could not find com.android.support.test🏃0.2.
Searched in the following locations:
file:/C:/Users/xyz/.m2/repository/com/android/support/test/runner/0.2/runner-0.2.pom
file:/C:/Users/xyz/.m2/repository/com/android/support/test/runner/0.2/runner-0.2.jar
https://jcenter.bintray.com/com/android/support/test/runner/0.2/runner-0.2.pom
https://jcenter.bintray.com/com/android/support/test/runner/0.2/runner-0.2.jar
https://repo1.maven.org/maven2/com/android/support/test/runner/0.2/runner-0.2.pom
https://repo1.maven.org/maven2/com/android/support/test/runner/0.2/runner-0.2.jar
Required by:
com.spotify.android:spotify-api:0.4.1
`
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIP5N7XXLSUUWG3OHDOD2P3RQCBVDANCNFSM4JXFZG2A>
.
|
Hi! I just updated my comment because I solved that problem but another one came up... |
Oh man nice job solving that first problem! Yeah it's kind of absolutely absurd that the best thing for this problem is something that hasn't been updated since 2016. The spotify dev team seems to have washed their hands of it. I spent a very long time looking at the other Android Spotify APIs trying to find a workaround but this is the only one that isn't fundamentally broken. I think you are extremely close. If you can't find the .aar file, we can see about me sending you mine. Once you have the .aar dependency, the actual usage of the API is really smooth and easy to understand. |
When I use "ext:.aar" to search for aar files in Windows Explorer the only file that shows up in the entire project folder is "spotify-auth-1.0.0-beta12.aar" in sample-search/libs, which is not what we want. It would be super great if you could send me the .aar as I don't plan on changing anything in the code anyways, so I don't think I'd ever need to build this project again... |
Rad. Here you go! I really hope it works. I also did a cursory look around and noticed that https://github.com/spotify/android-sdk has been updated recently and seems to have some good documentation. Maybe it wasn't there when I did this project, or maybe I decided it wouldn't work for me for reasons that have now been lost to time. |
Thank you so much! It's nice that the Android-API is being updated, but the readme.md says the following:
To me, this sounds like they don't plan on expanding the Android-API functionality and instead make everyone use the Web-API. Anyways, thanks a lot! |
Spotify is a beautiful disaster in so many ways. And no problem, let me know how it goes! |
So the module works now, I found out the hard way that retrofit 2 broke stuff, but adding this to module level build.gradle made it work:
|
Proud of you bro!
On Tue, May 5, 2020 at 6:02 PM Finni ***@***.***> wrote:
So the module works now, I found out the hard way that retrofit 2 broke
stuff
<twitter-archive/twitter-kit-android#31 (comment)>,
but adding this to module level build.gradle made it work:
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
implementation 'com.squareup.okhttp:okhttp:2.7.4'
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.7.4'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIP5N7TBPCULGXLXGAGEA7LRQCSLHANCNFSM4JXFZG2A>
.
--
-Mattie
|
Does the method to addTracksToPlaylist still work? I ran the Test which was provided and it yields an error. Another methods seems to work fine for me as far as I know, expect this . |
Hmm I used that method in my project and it worked, but it's been about a year since I've touched it and I don't know if something has broken in the meantime. I hope you figure it out! |
This project hasn't been updated since 2016, so it cannot be built with the latest version of gradle. There are some shenanigans that must be done. I am a very small programmer fish in this big scary ocean, but after a great deal of trial and error, I think I've found a way to make the project build properly on Windows.
Note: you'll want to just use "gradlew" in the command line instead of "./gradlew" in windows.
There are two things you need to do: Set the SDK to version 23, and set the buildtools to version 23.0.2.
Install gradle on your computer, if you haven't already. (I am 60% sure this step was necessary- maybe it wasn't).
In android studio, go to Tools -> SDK Manager. Check the box for Android 6.0(Marshmallow) and click "Ok". Now, if you were to run the gradlew command now, you would get an error like "cannot find BuildTools 23.0.2" or something like that. This is because the default Android Studio installation of SDK version 23 is 23.0.3, and the project wants 23.0.2. So we're going to fix that.
On the command line, navigate to C:\Users[username]\AppData\Local\Android\Sdk\tools\bin. This is where the sdkmanager lives. It can install the build tools we need. Type 'sdkmanager "build-tools;23.0.2"' and hit enter. Make sure there's no whitespace anywhere within the quotes. Here's more info on sdkmanager: https://developer.android.com/studio/command-line/sdkmanager
Go back to the location of the project. Run "gradlew", not "gradlew assemble". When I ran gradlew assemble it broke halfway through for reasons I couldn't decipher, but running "gradlew" will give you the .aar file in the location described in the setup.
Hopefully this will help! Godspeed!
PS To add the .aar file to your android project:
Move the .aar file into your android project directory (it can go anywhere)
PPS I'll just leave some notes on things I've had to fiddle with to make it work so far-
Edit
I've attached my .aar to my original post.
spotify-web-api-android-0.4.1.zip
The text was updated successfully, but these errors were encountered: