I was having this same issue trying to build a Kotlin multiplatform app onto iOS. The build worked for android but did not succeeded for iOS and failed with the error above. As pointed out by @M.G this is can be caused by network issues. Using my mobile hotspot instead of my home network resolved the issue.
Been struggling with this the whole day. This was happening for a fresh cordova android project. The issue was that the version 25.2.3 of the android build tools has been removed from all the repos(not sure why) but you can still get version 25.3.0 from mavenCentral.
build-tools are currently at 28.0.3; it ordinary even should ask to fetch them (whatever version). with current Android Studio the buildTools are chosen automatically; current version is Android Studio & Gradle plugin to 3.2.1. add Google's Maven Repository for the Java dependencies.
Several packages were impacted, so our workaround was multiple parts. To fix individual package dependencies, we added this to end of our android/build.gradle file (note our four affected packages and adjust for your cases):
We also had to add the exoplayer repo to android/build.grade allprojects.repositories section. Basically, when your build encounters a failure, google the missing package, find where it's hosted now and add it to your build.gradle. I get the impression the broken repos will be fixed in a few days. But many of us don't have a few days.
(end update)
Yesterday, the build works. Today, it doesn't. No android config changes. We're using AppCenter, so the builds there have no local cache and dependencies are re-downloaded every time. This is how the problem is masked on my local. When I ran gradle with --refresh-dependencies, I got the error.
I don't know enough about this stuff to be certain or how to check. For now, I'm stuck trying to figure out how to force gradle to pull the library (com.android.tools:common:25.3.3) from somewhere that it does currently exist.
I don't know about your situation, but I can't just update to a new version of gradle (since 2.3.3 version is causing depencency) because it's a lower dependency that is pulling gradle 2.3.3 in the first place. My build.gradle is using com.android.tools.build:gradle:3.1.4.
Could not resolve all files for configuration ':classpath'. Could not find com.android.tools:common:25.3.3. Searched in the following locations: -25.3.3.pom -25.3.3.jar -25.3.3.pom -25.3.3.jar Required by: project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.build:manifest-merger:25.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.ddms:ddmlib:25.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:shared:25.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:tracker:25.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools.layoutlib:layoutlib-api:25.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:dvlib:25.3.3 project : > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:repository:25.3.3 ```
df19127ead