While configuring my multiproject(~25 projects atm) a big amout of time wasted trying to fetch android sdk dependencies(see log below).
I save time using --offline, but it seems like i am ignoring a problem.
Of course, i have a lot of dependencies, all of them resolves correctly, but android sdk dependencies are not there. They can only be in local maven repository. Android gradle plugin somehow hardcodes it. And resolves too, but my problem is a big chunk of time wasted trying to resolve it from artifactory.
So it seems the issue is that Gradle is trying to fetch the Android dependencies from your local artifactory. Strange that artifactory is returning a 401 rather than a 404 then. By default Android gets its dependencies from jCenter. You might need to add it to your build script.
My artifactory is not so local, its an remote web server.
jCenter is a remote repository too, and there are no public android dependencies sdk there afaik
It’s kinda hack: reroute sdk to maven local repository we all download ($ANDROID_HOME/extras/android/m2repository)
So android gradle plugin know how to do it with jcenter and it’s not triyng to fetch with 404 result, but can’t do it from custom one?
jcenter in front of artifactory is not what i want, the goal of artifactory was a mirror proxy(with faster resolve), and in this scenario it will fallback from jcenter to artifactory.
about 401: its strange artifactory settings, in fact it is not found, but some mess in permissions…
I think I’m potentially confused as to what you are trying to do, what broke when, and what is different from what you are doing from what Android Studio configured by default?
So as I understand it now you have a local maven repo located at $ANDROID_HOME/extras/android/m2repository. Is your issue that you are not able to configure this as a local Maven repository?