Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Tools Using Git for Android Using Git for Android

He Zhang
He Zhang
7,475 Points

when I use github to get the picasso project, it contains 3 folders. I try to compile it, but doesn't work.

when I use github to get the picasso project, it contains 3 folders. I try to compile it, but doesn't work. I then try to only open the picasso-sample folder, this time I add a compile configuration of android application manually by clicking the on the button next to the "green triangle". Then it says package R does not exist.

So i don't understand how to use the files we get from Github. It seems it is on different format. I couldn't even find the graddle build files at all

1 Answer

Hi He Zhang, if you want to use the Picasso library and you're using Android Studio, then you just have to add this compile 'com.squareup.picasso:picasso:2.5.2' in your build.gradle. This is how you let Gradle download the jars for you. so you'll have something like this:

dependencies {
    compile 'com.android.support:support-v4:19.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
}

https://github.com/square/picasso

Good luck ! :-)

He Zhang
He Zhang
7,475 Points

Thank you for answering. But I am confused about how to use the sample code, or how to improve the actual picasso project by first compiling it, not how to use it as a library. For example, I clone the files from the github folders, and then how do I run those codes?

Ah okay. I just looked here and this is the project you're looking for. you should know that, this is a Java library, so this isn't an Android porject so Android Studio won't build this, unless your creating something called a "library module" in Android Studio. check out this tutorial on how to create libraries for Android.