简体   繁体   English

将android插件更新至2.2.0后,离子项目将无法生成(或运行)

[英]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 . 尝试在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. 将jcenter()添加到您的存储库。 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 将您的Android CordovaLib更新到最新版本

If this is not possible (or doesn't work) manually change the file 如果这不可能(或不起作用),请手动更改文件

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

repositories {
    mavenCentral()
    jcenter()
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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