After updating Android project to using gradle 3.0.0 project stopped building with success. Locally everything works properly.
Environment:
Stack used: Android & Docker, on Ubuntu 16.04
Problem occures on step: install-missing-android-tools@2.0.4
Reproducibility
Does a āRebuildā help? (You can trigger a rebuild from the Buildās page, by clicking the āRebuildā button in the top right corner of a finished build) : NO
Could not find com.android.tools.build:gradle:3.0.0.
This error comes from Gradle, not from Bitrise.
In your project you have a reference to this dependency/plugin (or in general might be a dependency of a dependency).
If you check the links gradle prints in the error (Searched in the following locations) those indeed are 404 / not found pages.
Why it works locally
Because most likely at one time this dependency version was available, and so itās now available on your Mac/PC in the filesystem (cache), and Gradle wonāt try to download it (as itās already downloaded). But then the version was removed / is no longer available, so it will no longer work on any new Mac/PC (as the dependency version canāt be downloaded).
How to debug & fix
In case of an Android āCould not find ā¦ā issue itās usually enough to just:
Do a clean git clone of the repository, into a new directory
And try to build the project from there
That should make it so that thereās no local dependency cache, and all dependencies will be downloaded (and the ones not available anymore will fail).
Once you can reproduce the issue, you can simply debug and fix it on your Mac/PC and then commit the changes, and itāll work on Bitrise.io too. In this specific case you most likely just have to upgrade the version of the plugin/dependency to a version which still exists.
For more debugging options & more infos / guides for local debugging please see:
Another thing for the Gradle Android plugin v3 migration: as described in the official migration guide (Ų¶ŲØŲ· Ų§ŁŲ„ŲµŲÆŲ§Ų± | Android Studio | Android Developers), please make sure that you add google() to the repositories list in build.gradle!
In fact youāll most likely need both google() and jcenter() right now:
To synchronize all of the answers here and elsewhere:
Make your buildscript in build.gradle look like this. It finds all of them between google and jcenter. Only one of them will not find all of the dependencies as of this answer.
Sorry it was my mistake. I had added google() to allprojects { repositories {}} instead of buildscript { repositories{}}. Itās working after the correction.
Thanks.
Please, i have the same exact issue, the only difference, my problem is i canāt download these dependencies for some reason, i am behind proxy and i tried set http(s)_proxy but doesnāt do anything. So iām not even sur where the problem comes from. i tried a differnrt connexion with no proxy (but slower), it takes several minutes before giving the same error
If any one have any idea, iām stuck since a week, i read everything on the internet .