简体   繁体   中英

how to use a maven repo in Android?

I am trying to extract dates from text in android and there is Java library here . However, the library needs a maven dependency as stated on the page:

 <dependency>
        <groupId>net.rationalminds</groupId>
        <artifactId>DateParser</artifactId>
        <version>1.0</version>
 </dependency>

I have looked at other other answers and also modified build.gradle in my android project as follows, but I am still not able to use the library. Can someone help me with the right usage of how to add dependencies?

repositories {
    google()
    jcenter()
    mavenCentral()
}

maven repo can be used in grade, the difference is the format, add code below to your build.gradle

dependencies {
    compile("net.rationalminds:DateParser:1.0")
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM