How can I include an android library into an existing project?

时间:2016-07-11 20:05:09

标签: android android-studio import

I've been trying to use this solution into my android project: https://github.com/jlhonora/multistatetogglebutton

I tried since several hours, but I only managed to messed up with everything, forcing me to delete everything, reseting android studio, clone my project and restart from scratch. I tried the solutions explained in android arsenal but it didn't do the trick.

1 个答案:

答案 0 :(得分:0)

It's all in the README on the git page you linked.

You need to include the following line within the dependencies block of your build.gradle:

compile 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'

Then you can use the library, once you have sync'd the build.gradle (which it should immediately ask you to do).