官术网_书友最值得收藏!

  • Learning RxJava
  • Thomas Nield
  • 197字
  • 2021-07-02 22:22:49

Using Gradle

There are several automated build systems available, but the two most mainstream options are Gradle and Maven. Gradle is somewhat a successor to Maven and is especially the go-to build automation solution for Android development. If you are not familiar with Gradle and would like to learn how to use it, check out the Gradle Getting Started guide (https://gradle.org/getting-started-gradle-java/).

There are also several decent books that cover Gradle in varying degrees of depth, which you can find at https://gradle.org/books/. The following screenshot displays the The Central Repository page showing how to set up RxJava 2.0.2 for Gradle:

You can find the latest Gradle configuration code and copy it into your Gradle script

In your build.gradle script, ensure that you have declared mavenCentral() as one of your repositories. Type in or paste that dependency line compile 'io.reactivex.rxjava2:rxjava:x.y.z', where x.y.z is the version number you want to use, as shown in the following code snippet:

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
mavenCentral()
}

dependencies {
compile 'io.reactivex.rxjava2:rxjava:x.y.z'
}

Build your Gradle project and you should be good to go! You will then have RxJava and its types available for use in your project.

主站蜘蛛池模板: 辰溪县| 饶阳县| 平安县| 万载县| 凭祥市| 柘城县| 天长市| 阿拉善右旗| 洞头县| 莱芜市| 莫力| 建水县| 栖霞市| 育儿| 探索| 廉江市| 桐城市| 嘉义县| 化州市| 阿克陶县| 许昌市| 象山县| 县级市| 德安县| 商南县| 柳州市| 天气| 松江区| 湘潭县| 华亭县| 黑山县| 阳谷县| 安仁县| 遂宁市| 宾川县| 荃湾区| 屏边| 法库县| 新乡县| 光山县| 合阳县|