403 when building

from the CommonsWare Community archives

At October 8, 2021, 11:10am, Raptor asked:

Hello,

I am trying to make a build for work and I get a bunch of 403 Forbidden when building. For example, I get:

Could not GET ‘https://dl.bintray.com/android/android-tools/com/dynatrace/agent/agent-android/maven-metadata.xml’. Received status code 403 from server: Forbidden

I googled this and I found that it’s a good practice to upgrade to the latest gradle version and so on. So I updated to 7.0.2 and Android Studio Arctic Fox. I still get the same error (although for other libraries than the initial ones).

I am stuck since 2 days ago with no solution in sight. I tried building with my work VPN, without it and so on. But 403 sounds like “ok, I understood your request, but you’re forbidden to get this dependency”.

Do you see a way out of this?


At October 8, 2021, 12:04pm, mmurphy replied:

Bintray’s private repository stuff shut down months ago, and I think you get 403’s as responses. You would need to ask whatever “dynatrace” is where their new artifact repository is. Based on this, it looks like their artifacts are available on Maven Central, which you would enable by adding mavenCentral() to your repositories (i.e., next to each of the google() entries).


At October 8, 2021, 12:22pm, Raptor replied:

I think I managed to solve some of them but it now it says:

Unable to resolve dependency for ‘:app@qaDebug/compileClasspath’: Could not resolve packagename, where “packagename” is an internal repository.

I tried to access it in the browser and after putting in my username and password I can go to that library in my browser. But Android Studio, while having the same credentials, doesn’t want to resolve that. I have some special characters in my password. I keep my credentials in gradle.properties which is a local file, and there they are declared without quotation marks.

I saw that by default it tries to use escape characters (backslash) and the entire password is without quotes… maybe the issue is there? I updated to the latest Arctic Fox Android Studio, maybe it interprets these differently?


At October 8, 2021, 12:29pm, Raptor replied:

(although now I think it might be a proxy issue, as it can’t resolve the library instead of a 403 that I had before)


At October 8, 2021, 12:37pm, mmurphy replied:

Sorry, you are well out of my depth at this point.


At October 8, 2021, 12:39pm, Raptor replied:

Well, it seems that it’s a proxy issue and Android Studio can’t reach the internal repository of my company. At least this is what I extract out of the “cannot resolve dependency” message.