ionic build android --release 报错

// 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'
}

}
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 179,729评论 25 708
  • 用两张图告诉你,为什么你的 App 会卡顿? - Android - 掘金 Cover 有什么料? 从这篇文章中你...
    hw1212阅读 14,341评论 2 59
  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom阅读 3,284评论 0 3
  • 3.24日精进:敬畏—进入—体验—交给—持续 1,缺啥补啥,怕啥练啥; 2,一切为我所用,所用为团队家; 3,我想...
    zhabei阅读 195评论 0 0
  • “面码,找到你了。”《未闻花名》(原名我们仍未知道那天所看见的花的名字)是每个看动漫的小伙伴必看不可的一部番。各人...
    覃大瑜阅读 1,092评论 0 1

友情链接更多精彩内容