I want to try this library in my android project. I am using Android Studio 0.4.6.
The README.markdown file tells me to insert this inside pom.xml:
The problem is that I do not have any pom.xml. I created one in my project root directory and synced gradle settings but it does nothing. Till now I only used already compiled .jar files or used the gradle compile function.
How can I use this library in my project?
| ||
add a comment
|
20
|
Android Studio doesn't use Maven as its builder; it uses Gradle instead. Fortunately, Gradle can use Maven repositories to fetch dependencies, so it's a matter of taking that information that would go into the pom file and using it in Gradle format. These modifications go in the build.gradle file in your module's directory (not the build file in the project root directory).
First, set up the repository where it can find the dependency.
and then add the dependency itself by adding this line to your
dependencies block:
|
没有评论:
发表评论