Error message:
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'android'.
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.0. Searched in the following locations: https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.jar Required by:
android:CordovaLib:unspecified
Remove platforms/android folder and add Android again:
ionic platform add android
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
add jcenter() to your repositories. this worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With