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


#1

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


#2

Try this, seems related


#3

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.


#4

so you still havnt got it working???


#5

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.


#6

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


#7

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.


#8

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


#9

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


#10

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


#11

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


#12

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

#13

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!


#14

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


#15

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


#16

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