Could not find com.android.tools:common:25.2.3

  • A+
Category:Languages

I have set up the environment for compiling a Cordova Android app on my desktop and everything has worked fine. Then I compiled it on my laptop and I can't get it to compile the app.

I get this error

Could not find com.android.tools:common:25.2.3. Searched in the following locations:     https://jcenter.bintray.com/com/android/tools/common/25.2.3/common-25.2.3.pom     https://jcenter.bintray.com/com/android/tools/common/25.2.3/common-25.2.3.jar     https://maven.google.com/com/android/tools/common/25.2.3/common-25.2.3.pom     https://maven.google.com/com/android/tools/common/25.2.3/common-25.2.3.jar Required by:     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.build:manifest-merger:25.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.ddms:ddmlib:25.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.analytics-library:shared:25.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.analytics-library:tracker:25.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools:sdklib:25.2.3 > com.android.tools.layoutlib:layoutlib-api:25.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools:sdklib:25.2.3 > com.android.tools:dvlib:25.2.3     project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools:sdklib:25.2.3 > com.android.tools:repository:25.2.3 

and this is my build.gradle

apply plugin: 'com.android.application'  buildscript {   repositories {     jcenter()     maven { url 'https://maven.google.com' }   }       dependencies {         classpath 'com.android.tools.build:gradle:2.2.3'     } }  allprojects {   repositories {     jcenter()     maven { url 'https://maven.google.com' }   } }  task wrapper(type: Wrapper) {     gradleVersion = '2.14.1' } 

 


For Cordova Users

Been struggling with this the whole day. This was happening for fresh cordova android project. Here is how I fixed it:

From your project folder navigate to platforms/android/cordovaLib and open up the build.gradle file and replace this line:

classpath 'com.android.tools.build:gradle:2.2.3' 

with:

classpath 'com.android.tools.build:gradle:2.3.0' 

Then open up the build.gradle file from the platforms/android/folder and make the above change too. And then replace:

 maven {      url "https://maven.google.com"  } 

with:

mavenCentral() 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: