【问题标题】:Ionic cordova build android error fail to exportIonic cordova build android 错误无法导出
【发布时间】:2017-10-03 08:59:41
【问题描述】:

我正在尝试使用 Ionic for Android 发布我的第一个应用程序,我使用的是:

cordova build android --release

但它显示了这个错误:

|运行命令 [19:52:24] lint 在 21.58 秒内完成 × 运行命令 - 失败! [ERROR] 运行 cordova build android --release 时出错(退出代码 1):

    ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
    Starting a Gradle Daemon (subsequent builds will be faster)
    :wrapper

    BUILD SUCCESSFUL in 16s
    1 actionable task: 1 executed
    Subproject Path: CordovaLib
    The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use
    Task.doLast(Action) instead.
            at build_79qurmse68iuc8ksfkmhnwhsg.run(D:\IONIC\Projects\myFirstApp\platforms\android\build.gradle:137)

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'android'.
    > Could not resolve all dependencies for configuration ':_debugApk'.
        > A problem occurred configuring project ':CordovaLib'.
           > Could not resolve all dependencies for configuration ':CordovaLib:classpath'.
              > Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3.
                Required by:
                    project :CordovaLib
                 > Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3.
                    > Could not get resource
    'https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom'.
                       > Could not GET
    'https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom'.
                          > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed:
    Connection timed out: connect

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

    BUILD FAILED

    Total time: 32.287 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 resolve all dependencies for configuration ':_debugApk'.
        > A problem occurred configuring project ':CordovaLib'.
           > Could not resolve all dependencies for configuration ':CordovaLib:classpath'.
              > Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3.
                Required by:
                    project :CordovaLib
                 > Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3.
                    > Could not get resource
    'https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom'.
                       > Could not GET
    'https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom'.
                          > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed:
    Connection timed out: connect

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

【问题讨论】:

  • 不确定为什么 Ionic 需要 Bintray 插件。也不确定这是一个与 Android 相关的问题,因为 Ionic 不在 Android SDK 中。

标签: ionic-framework


【解决方案1】:

确保 android_home 类路径设置正确

【讨论】:

  • 当我在cmd中输入android时,它会打开android sdk manager,对吗?
猜你喜欢
  • 2018-12-14
  • 1970-01-01
  • 2021-07-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多