美文网首页
ionic build android --release 报错

ionic build android --release 报错

作者: my木子 | 来源:发表于2018-10-24 11:16 被阅读0次

// No resource identifier found for attribute 'appComponentFactory' in package 'android'

报错内容

Running command: D:\LI\ionic\nodejs\node.exe D:\index\lc\JH-ship-1\hooks\after_prepare\010_add_platform_class.js D:\index\lc\JH-ship-1
add to body class: platform-android
ANDROID_HOME=D:\LI\ionic\androidsdk
JAVA_HOME=D:\Program Files\Java\jdk1.8.0_151
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not find support-core-ui.aar (com.android.support:support-core-ui:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-core-ui/27.1.1/support-core-ui-27.1.1.aar

* Try:
Run with --stacktrace option to get the stack trace. Run with 39m
BUILD FAILED

Total time: 1.859 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not find support-core-ui.aar (com.android.support:support-core-:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-core-ui/27.1.1/support-core-ui-27.1.1.aar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get 
D:

在项目级别的build.gradle 的allprojects节点下面加上

allprojects {
    repositories {
        mavenCentral();
        jcenter()
    }
    configurations.all {
    resolutionStrategy.force 'com.android.support:support-v4:24.0.0'
}

}

相关文章

网友评论

      本文标题:ionic build android --release 报错

      本文链接:https://www.haomeiwen.com/subject/gauttqtx.html