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

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.

主站蜘蛛池模板: 龙井市| 金寨县| 德格县| 玉门市| 广南县| 赣州市| 调兵山市| 科技| 长寿区| 舒城县| 北碚区| 盘山县| 文昌市| 迁安市| 武穴市| 大连市| 长宁县| 河曲县| 扶沟县| 八宿县| 新巴尔虎右旗| 封开县| 新野县| 日喀则市| 辉南县| 新乡县| 元谋县| 综艺| 武邑县| 溧阳市| 宜阳县| 登封市| 安化县| 三明市| 嵊州市| 开原市| 札达县| 镇江市| 嘉荫县| 宾川县| 萍乡市|