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

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.

主站蜘蛛池模板: 彝良县| 萨迦县| 宁化县| 五莲县| 六盘水市| 张北县| 康保县| 共和县| 巴里| 孟津县| 临沧市| 乐陵市| 历史| 米易县| 景德镇市| 滨海县| 崇礼县| 北海市| 虎林市| 合阳县| 蕲春县| 邢台县| 平度市| 仲巴县| 沭阳县| 巴林左旗| 巧家县| 海伦市| 靖边县| 屏南县| 迭部县| 宕昌县| 商南县| 泰兴市| 莱州市| 德庆县| 郁南县| 平果县| 贵阳市| 合水县| 辽阳市|