Denzel
Denzel

Reputation: 11

How to import a library from github?

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.

Upvotes: 1

Views: 1519

Answers (3)

sup4eli
sup4eli

Reputation: 324

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

Upvotes: 1

Abhishek Singh
Abhishek Singh

Reputation: 9178

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'
}

Upvotes: 1

Kaushal28
Kaushal28

Reputation: 5557

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'

Upvotes: 0

Related Questions