0

我已经生成了示例应用程序。我能够罗盘编译。没有 packager.json 配置就可以生成包。我需要 android 包,所以在 packager.json 中完成了配置,例如
“平台”:“Android”、“sdkPath”:“D:/Sench_Touch/android-sdk-windows”,但在命令提示符中出现错误,如下所示。如何解决这个问题?谁能告诉我。谢谢

 [INF]           Completed compilation.
    [INF]           Processed remote file touch/sencha-touch.js
    [INF]           Processed local file app.js
    [INF]           Minified app.js
    [INF]           Minified resources/css/app.css
    [INF]           Generated app.json
    [INF]           Embedded microloader into index.html
    [INF]           Generating native package
    [INF]           Packaging your application as a native app to D:\Sench_Touch\sen
    cha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native ...
    [ERR]           failed running native packager
    [ERR]           'xcopy' is not recognized as an internal or external command,
    operable program or batch file.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    Created directory D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\na
    tive\src\com\mycompany\myAppID
    Added file D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native\sr
    c\com\mycompany\myAppID\STActivity.java
    Created directory D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\na
    tive\res
    Created directory D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\na
    tive\bin
    Created directory D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\na
    tive\libs
    Created directory D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\na
    tive\res\values
    Added file D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native\re
    s\values\strings.xml
    Created directory D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\na
    tive\res\layout
    Added file D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native\re
    s\layout\main.xml
    Added file D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native\An
    droidManifest.xml
    Added file D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native\bu
    ild.xml
    Added file D:\Sench_Touch\sencha-touch-2.1.1-gpl\DemoApp\build\DemoApp\native\pr
    oguard-project.txt
    'C:\Users\User' is not recognized as an internal or external command,
    operable program or batch file.
    ""D:/Sench_Touch/android-sdk-windows\tools\android" create project --target andr
    oid-10 --name MyApplication --activity STActivity --path "D:\Sench_Touch\sencha-
    touch-2.1.1-gpl\DemoApp\build\DemoApp\native\/" --package com.mycompany.myAppID"

    Could not run ant with error: 1
    Failed to package application
4

2 回答 2

0

从您的应用程序文件夹运行

森查科尔多瓦初始化

然后更改 cordova.local.properties=android

节省。

运行 sencha app build native

如果您使用的是 ST2.3.1,您会在cordova\platfomrs\android\ant-build*-*.apk文件夹中找到 app_name-debug.apk :-)

注意:'你需要使用npm install cordova -g 安装cordova

于 2014-08-28T12:06:43.183 回答
0

您是否将 Sencha SDK 工具安装在带有空格名称的目录中?当我在 Program Files 中安装 Sencha Cmd 时,我遇到了同样的问题。出现此问题后,我将其安装在 C:/Sencha 中并已修复。

于 2013-03-01T14:14:55.523 回答