【问题标题】:when i type ionic cordova build android当我输入 ionic cordova build android
【发布时间】:2017-05-16 16:30:29
【问题描述】:

第离子信息 全局包:

@ionic/cli-utils : 1.0.0
Cordova CLI      : 7.0.1 
Ionic CLI        : 3.0.0

本地包:

@ionic/cli-plugin-cordova : 1.0.0
@ionic/cli-plugin-ionic1  : 1.0.0
Ionic Framework           : ionic1 1.3.3

系统:

Node       : v7.9.0
OS         : Linux 4.4
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

✖ 运行命令 - 失败!

[错误] Cordova 遇到错误。 您可以通过直接运行上面的 Cordova 命令获得更多信息。

[ERROR] 运行cordova build android时出错(退出代码1):

    Running command: /home/mohamed/Bureau/IonicApp/PFE/hooks/after_prepare/010_add_platform_class.js /home/mohamed/Bureau/IonicApp/PFE
    ANDROID_HOME=/home/mohamed/Android/Sdk
    JAVA_HOME=/usr/lib/java/jdk1.8.0_131
    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_5epix5or8n8ltg7s8l8l2lith.run(/home/mohamed/Bureau/IonicApp/PFE/platforms/android/build.gradle:137)
    The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
    Incremental java compilation is an incubating feature.
    The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
    :preBuild UP-TO-DATE
    :preDebugBuild UP-TO-DATE
    :checkDebugManifest
    :CordovaLib:preBuild UP-TO-DATE
    :CordovaLib:preDebugBuild UP-TO-DATE
    :CordovaLib:checkDebugManifest
    :CordovaLib:prepareDebugDependencies
    :CordovaLib:compileDebugAidl UP-TO-DATE
    :CordovaLib:compileDebugNdk UP-TO-DATE
    :CordovaLib:compileLint UP-TO-DATE
    :CordovaLib:copyDebugLint UP-TO-DATE
    :CordovaLib:mergeDebugShaders UP-TO-DATE
    :CordovaLib:compileDebugShaders UP-TO-DATE
    :CordovaLib:generateDebugAssets UP-TO-DATE
    :CordovaLib:mergeDebugAssets UP-TO-DATE
    :CordovaLib:mergeDebugProguardFiles UP-TO-DATE
    :CordovaLib:packageDebugRenderscript UP-TO-DATE
    :CordovaLib:compileDebugRenderscript UP-TO-DATE
    :CordovaLib:generateDebugResValues UP-TO-DATE
    :CordovaLib:generateDebugResources UP-TO-DATE
    :CordovaLib:packageDebugResources UP-TO-DATE
    :CordovaLib:processDebugManifest UP-TO-DATE
    :CordovaLib:generateDebugBuildConfig UP-TO-DATE
    :CordovaLib:processDebugResources/home/mohamed/Android/Sdk/build-tools/25.0.3/aapt: 3: /home/mohamed/Android/Sdk/build-tools/25.0.3/aapt: Syntax error: Unterminated quoted string

     FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':CordovaLib:processDebugResources'.
    > com.android.ide.common.process.ProcessException: Failed to execute aapt

    * 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: 1.848 secs
    Error: /home/mohamed/Bureau/IonicApp/PFE/platforms/android/gradlew: Command failed with exit code 1 Error output:
    /home/mohamed/Android/Sdk/build-tools/25.0.3/aapt: 3: /home/mohamed/Android/Sdk/build-tools/25.0.3/aapt: Syntax error: Unterminated quoted string

FAILURE:构建失败并出现异常。

    * What went wrong:
    Execution failed for task ':CordovaLib:processDebugResources'.
    > com.android.ide.common.process.ProcessException: Failed to execute aapt

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

【问题讨论】:

    标签: android linux ionic-framework


    【解决方案1】:

    请将本地包和全局包更新到最新版本,然后重试。 全局包:

    @ionic/cli-utils : 1.3.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.3.0
    

    本地包:

    @ionic/app-scripts              : 1.3.0
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : android 6.1.2
    Ionic Framework                 : ionic-angular 3.0.1
    

    系统:

    Node       : v6.10.2
    OS         : Windows 7
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    

    【讨论】:

      猜你喜欢
      • 2018-03-19
      • 2018-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-17
      • 1970-01-01
      • 2016-09-02
      相关资源
      最近更新 更多