简体   繁体   English

离子构建错误:发生配置根项目“Android”

[英]Ionic Build Error: occurred configuring root project 'Android'

I am building ionic cordova project currently.我目前正在构建离子科尔多瓦项目。 But prints out with the following error.但打印出以下错误。 在此处输入图片说明

The following is my gradle-wrapper.properties以下是我的 gradle-wrapper.properties

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=../gradle-2.13-all.zip

The following build.gradle下面的build.gradle

buildscript {
    repositories {
        mavenCentral();
        jcenter()
    }

    // Switch the Android Gradle plugin version requirement depending on the
    // installed version of Gradle. This dependency is documented at
    // http://tools.android.com/tech-docs/new-build-system/version-compatibility
    // and https://issues.apache.org/jira/browse/CB-8143
    dependencies {
        classpath 'com.android.tools.build:gradle-2.13-all'
    }
}

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        mavenCentral();
        jcenter()
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.13'
}

change your current dependencies classpath from更改您当前的依赖类路径

dependencies {
        classpath 'com.android.tools.build:gradle-2.13-all'
    }

to

 dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
    }

Let me know if this doesn't fix your issue.如果这不能解决您的问题,请告诉我。

For others who are coming late here, just open your android project under $(Project_Root)\\platforms\\android in android studio.对于迟到的其他人,只需在 android studio 中的 $(Project_Root)\\platforms\\android 下打开您的 android 项目。 Then android studio will take care of downloading all the right dependencies.然后 android studio 将负责下载所有正确的依赖项。

暂无
暂无

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

相关问题 离子生成错误:配置根项目“ android”时发生。 无法解析所有依赖项以进行配置 - Ionic build error: occurred configuring root project 'android'. Could not resolve all dependencies for configuration Flutter:gradle 构建失败,错误为“评估根项目 'android' 时出现问题 > 配置项目 ':app' 时出现问题。” - Flutter:gradle build failed with error "A problem occurred evaluating root project 'android' > A problem occurred configuring project ':app'." 发生了配置根项目'android' - occurred configuring root project 'android' 如何修复 gradle 构建错误配置根项目时出现问题? - How to fix gradle build error A problem occurred configuring root project? 配置根项目“android”时出现问题 Flutter - A problem occurred configuring root project 'android' Flutter 配置项目':app'时出现Android 3.1 build gradle 4.4错误 - Android 3.1 build gradle 4.4 error occurred configuring project ':app' tns 运行 android 产生错误:配置根项目“核心”时出现问题。 >未指定 compileSdkVersion。 请加到build.gradle - tns run android produces error: A problem occurred configuring root project 'core'. >compileSdkVersion is not specified. Please add it to build.gradle Flutter Android Build Gradle 配置根项目“android”时出错? - Flutter Android Build Gradle error configuring root project 'android'? Cordova应用程序构建失败-配置根项目'android'错误消息 - Cordova app build failed - configuring root project 'android' error message 运行flutter项目时配置根项目'android'出现问题 - A problem occurred configuring root project 'android' when run flutter project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM