Android Studio dependence add dependencies on items in the MAVEN repository error

Source: Internet
Author: User
Tags jcenter

Early in the Android studio, the use is still good, but some places are still confused. such as the Gradle configuration.

Today, when adding Rxjava's reliance, it's not going to get up. Do not know what the situation, Baidu a bit, all kinds of attention has, is not in line with me, and then analyzed. Rxjava is on GitHub, and I've configured the warehouse address to be jcenter, with Maven. But just because you don't have GitHub and don't know how to match it to GitHub, press Jcenter and maven. Jcenter are directly added, not a link or anything. Think of the Rxjava I want to find, estimated overhang, from Maven, many of the configuration maven will take a URL. This MAVEN is configured in the Gradle in the project root directory.

allprojects {    repositories {        jcenter ()        "Https://jitpack.io" };}    }

Mine is so configured. Well, follow the instructions on GitHub to work with the Gradle, introducing

Compile "io.reactivex.rxjava2:rxjava:2.x.y"

After introduction, Sync now. Useless, error. What to do?

In no hurry, I directly open Maven's connection. You can see the following:

  

In the box above, enter the GitHub address of Rxjava in the input box. Select the version number and you can see that the STEP2 has changed. Just copy the compile in the Step2.

  

Look at the changes:

  

Finally, the synchronization is successful.

Android Studio dependence add dependencies on items in the MAVEN repository error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.