Home » Android » maven – Ionic Gradle failure "Could not find com.android.tools.build:gradle:2.2.3"

maven – Ionic Gradle failure "Could not find com.android.tools.build:gradle:2.2.3"

Posted by: admin May 14, 2020 Leave a comment


I am attempting, in Windows 7, to compile my Ionic project Android platform using the Ionic CLI. This is something that previously worked, and now does not. The only thing that has changed is that I upgraded Android Studio. However, I am not compiling with Android studio, so I am surprised that I am getting Gradle errors. For:

$ ionic run android

The output is:

A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApk'.
   > A problem occurred configuring project ':CordovaLib'.
      > Could not resolve all dependencies for configuration ':CordovaLib:classpath'.
         > Could not find com.android.tools.build:gradle:2.2.3.
           Searched in the following locations:
           Required by:

Though the output claims that I can gain additional error info with the –stacktrace and –debug flags, this is untrue.

I have seen threads suggesting that the problem is that one or more of mavenCentral() or jcenter() are missing from the repositories list in the build.gradle. These are both present.

I tried just throwing an HTTP GET at the addresses and it comes back 404. Is there somewhere else that I can direct Gradle to look for these files?

Possibly the strangest thing is that the files that it claims it can’t find, actually do get downloaded into the Gradle cache each time (if I clear them, they appear the next time I execute the command). They appear in:




Steps I’ve taken so far:

  • upgrade Gradle
  • clear both gradle and Maven repositories
  • Try it off the company intranet with the --no-proxy flag on

I’m not sure what the next troubleshooting step should be.

How to&Answers:

I had same issue on mac, what worked for me was fresh install of android studio and ionic.
So probably first uninstall everything, then install android studio update it install whatever tools required, install gradle THEN install cordova and ionic.


This is maybe due to the path.Ionic is not able to find the path of the sdks in the same folder as u are giving there in your environment variables .
Try to change environment variables. Maybe you have given a local path instead of global hence it was not able to find sdks of your android studio.