Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic project won't build (or run) after android plugin updated to 2.2.0

Tags:

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
    
like image 479
Mike Avatar asked Sep 24 '16 06:09

Mike


2 Answers

Remove platforms/android folder and add Android again:

ionic platform add android
like image 104
Daniel Garcia Jones Avatar answered Sep 22 '22 16:09

Daniel Garcia Jones


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.

like image 32
dalud Avatar answered Sep 26 '22 16:09

dalud