Could not find support-v4.aar (com.android.support:support-v4:26.1.0)

My project was working fine yesterday and today i’m getting the error below. please Help.

  • What went wrong: Could not resolve all files for configuration ‘:app:debugCompileClasspath’.

Could not find support-v4.aar (com.android.support:support-v4:26.1.0). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.aar

Try this, seems related

1 Like

It happened to me too, I got the same error message.

Now, after trying uninstalling everything and installing them again in the same order I have been doing it in the last couple of weeks, I get these messages:

* What went wrong:
Could not resolve all files for configuration ':debugCompileClasspath'.
> Could not find livedata-core.aar (android.arch.lifecycle:livedata-core:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/lifecycle/livedata-core/1.1.0/livedata-core-1.1.0.aar
> Could not find viewmodel.aar (android.arch.lifecycle:viewmodel:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/lifecycle/viewmodel/1.1.0/viewmodel-1.1.0.aar
> Could not find runtime.aar (android.arch.core:runtime:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/core/runtime/1.1.0/runtime-1.1.0.aar

I just tried lucasmds solution but it didn’t work; it might have worked If I hadn’t tried uninstalling and installing things.

so you still havnt got it working???

Thanks a lot lucasmds that totally did the trick. the meven and Jcenter were inverted in my project. funny how that can break a project. any advice on how or where to look when I have similar problems would be much appreciated.

Hi,
The problem is that solution not work in Ionic Pro

I have the same issue, the @lucasmds solution didn’t work.

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find support-vector-drawable.aar (com.android.support:support-vector-drawable:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-vector-drawable/27.1.1/support-vector-drawable-27.1.1.aar
> Could not find livedata-core.aar (android.arch.lifecycle:livedata-core:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/lifecycle/livedata-core/1.1.0/livedata-core-1.1.0.aar
> Could not find viewmodel.aar (android.arch.lifecycle:viewmodel:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/lifecycle/viewmodel/1.1.0/viewmodel-1.1.0.aar
> Could not find runtime.aar (android.arch.core:runtime:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/core/runtime/1.1.0/runtime-1.1.0.aar

IOS has no problems and builds fine.

I’m having the same problem.
How can we get official support from Ionic PRO?

in this proyect your use the plugin phonegap-plugin-barcodescanner? I remove this plugin and build complete.

Thanks for your reply. Unfortunately I don’t use this dependency :expressionless:

Any luck guys?
I tried what @lucasmds suggested but the issue persists

After some searching i came across with:

1 - Add google() to the “\platforms\android\CordovaLib\build.gradle” file

repositories {
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }

If doesn’t work, add “google()”: in “\platforms\android\build.gradle

buildscript {
    repositories {
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    // ...
}

allprojects {
    repositories {
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    // ...
    }
}

2- Try to update android-cordova

Remove the platform, then:

cordova platform add android@7.1.1
1 Like

First I tried modifying only the platforms/android/CordovaLib/build.gradle file, without success.

Then I tried your last solution and still didn’t work, but I read the logs and there was an error with goggle(). I just removed that and the building process now won’t throw any errors!

Thanks!

It’s building right now, don’t do anything. Just try it again.

I think this is a very dirty fix since you have to do it every time you androd platform

1 Like

You rock!
I spent I don’t know how many hours on this.
Thank you!

Thank you @lucasmds. In my case, I tried first the google() trick but it didn’t work, then I removed/added android platform from Cordova and it’s running normally :smile:
*My info:Ionic: Ionic CLI: 4.10.3, @ionic/angular 4.0.1, cordova-lib@8.1.1, Cordova Platforms : android 7.1.4)System: