简体   繁体   中英

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

Error message:

FAILURE: Build failed with an exception.

删除platform / android文件夹,然后再次添加Android:

ionic platform add android
 buildscript {
    dependencies {
       classpath 'com.android.tools.build:gradle:2.2.0'
 }
}

try modifying these in your build.gradle . good luck

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.

A bit late but as the other answers didn't work hopefully this will help others

Update your Android CordovaLib to the latest version

If this is not possible (or doesn't work) manually change the file

\\platforms\\android\\CordovaLib\\build.gradle and add in jcenter()

repositories {
    mavenCentral()
    jcenter()
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM