How to import a library from github?

1.5k Views Asked by At

I don't understand how to add a library in my new project.

https://github.com/txusballesteros/bubbles-for-android

I saw similar posts but I don't get the library in my project.

Error:Configuration with name 'default' not found.

And when I add the library can I change the original source code and can I use it because I read about the same License ?

Please help me, I was trying many methods and I failed.

3

There are 3 best solutions below

1
sup4eli On BEST ANSWER

Locate your build.gradle file:

  1. Go to android view (easiest this way)
  2. Locate Gradle Scripts folder:

enter image description here

  1. Locate your correct build.gradle file (watch it, there are 2 of those who look similar):

enter image description here

  1. Add the this statement (compile 'com.txusballesteros:bubbles:1.2.1') according to picture:

enter image description here

  1. Good to go
0
Kaushal28 On

Add following to your Build.Gradle under dependency block and then sync. project. Now you can use that library methods in your code.

compile 'com.txusballesteros:bubbles:1.2.1'
0
Abhishek Singh On

Add the library dependency in your app level build.gradle file(not project level). you don't need to download any library file just add this dependency and sync the project

dependencies {
    ...
    compile 'com.txusballesteros:bubbles:1.2.1'
}