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

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.

主站蜘蛛池模板: 宝应县| 莲花县| 比如县| 衡阳县| 永清县| 凤阳县| 临汾市| 平南县| 南丹县| 阿荣旗| 历史| 纳雍县| 临朐县| 三都| 得荣县| 星子县| 西吉县| 宕昌县| 西华县| 兴隆县| 金平| 祁门县| 汕头市| 乐东| 宽城| 石楼县| 张家界市| 措美县| 西城区| 炉霍县| 朝阳市| 义马市| 桑日县| 广安市| 中阳县| 南安市| 上杭县| 准格尔旗| 祁门县| 潜江市| 遂川县|