How to integrate GraphView into my project?
Solution 1
Option 1:
- get the library's jar from here.
- copy that jar to the
/libs
folder in the project where you want to useGraphView
. - use it.
Option 2:
-
Get the project from
github
usinggit
:- move to your favorite directory using git bash
- execute from
git
git clone git://github.com/jjoe64/GraphView.git graphView
- in
Eclipse
File
->Import...
->Android
-/Existing Android Code Into Project
(useBrowse
to navigate to thegraphView
folder from your favorite folder of the previous step) - right click the project which will use the
GraphView
->Properties
->Android
-> at the bottom(theLibrary
area) useAdd...
to selectGraphView
- use it
Solution 2
GraphView has been added to Maven Central, so Android Studio integration is even easier now. Just add the following to your build.gradle file and you don't need to download the .jar.
dependencies {
'com.jjoe64:graphview:3.1.3'
}
Solution 3
Answer using android studio:
- download .jar from from this link
-add jar file to project->app->libs
-open build.gradle and under dependencies write:
dependencies {
compile files('libs/graphview-3.1.jar')
}
after that sync project
Solution 4
in Android Studio, add this line in your build.gradle file :
dependencies {
compile files('libs/graphview-3.1.jar')
}
And don't forget to click on "Sync project with Gradle files".
scarhand
Updated on June 04, 2022Comments
-
scarhand about 2 years
So I was looking for a graph solution for my app and I stumbled on GraphView.
I was looking around on the github and in the source files and I can't seem to find an integration guide. Maybe it's right in front of my face but I can't see it anywhere.
I have never integrated someone elses code into my own before, so if anyone could give me a quick rundown on how to integrate GraphView with my current project, I would greatly appreciate it.
-
Sruit A.Suk almost 9 yearsin case of import to Eclipse, you need to move all source file from 'java' folder to 'src' folder