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