使用sencha创建android应用程序时出错

使用sencha创建android应用程序时出错,android,json,extjs,Android,Json,Extjs,使用触摸屏2.2.1和Cmd 3.1.2.342 我正在尝试使用以下命令行创建.apk文件: sencha build native 我也试过了 sencha build native app 及 以及 sencha app build native 不幸的是,它失败并返回此代码 [ERR] null at com.sencha.util.Version.<init>(Version.java:36) at com.sencha.tools.pkg.Mode

使用触摸屏2.2.1和Cmd 3.1.2.342 我正在尝试使用以下命令行创建.apk文件:

sencha build native
我也试过了

sencha build native app

以及

sencha app build native
不幸的是,它失败并返回此代码

[ERR] null
     at com.sencha.util.Version.<init>(Version.java:36)
     at com.sencha.tools.pkg.Model$Package.<init>(Model.java:640)
     at com.sencha.tools.pkg.Model$Package.load(Model.java:627)
     at com.sencha.command.environment.WorkspaceRepository.scanPackages(Workspac eRepository.java:210)
     at com.sencha.command.environment.WorkspaceRepository.scanWorkspacePackages (WorkspaceRepository.java:184)
     at com.sencha.command.environment.WorkspaceRepository.getWorkspaceCatalog(W orkspaceRepository.java:228)
     at com.sencha.command.environment.WorkspaceRepository.getWorkspaceCatalog(W orkspaceRepository.java:223)
     at com.sencha.command.environment.WorkspaceRepository.getPackage(WorkspaceR epository.java:142)
     at com.sencha.command.environment.AppOrPackageEnvironment$1.matches(AppOrPa ckageEnvironment.java:87)
     at com.sencha.command.environment.AppOrPackageEnvironment$1.matches(AppOrPa ckageEnvironment.java:83)
     at com.sencha.util.CollectionUtil.filter(CollectionUtil.java:65)
     at com.sencha.util.CollectionUtil$MonadicList.filter(CollectionUtil.java:25 2)
     at com.sencha.command.environment.AppOrPackageEnvironment.getRequires(AppOr PackageEnvironment.java:83)
     at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackag eEnvironments(AppOrPackageEnvironment.java:165)
     at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackag esNoThemes(AppOrPackageEnvironment.java:212)
     at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackag eNamesNoThemes(AppOrPackageEnvironment.java:203)
     at com.sencha.command.environment.AppEnvironment.<init>(AppEnvironment.java :66)
     at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.ja va:193)
     at com.sencha.command.Sencha.loadBuildEnvironment(Sencha.java:374)
     at com.sencha.command.Sencha.main(Sencha.java:127)
有人能告诉我是什么导致了这个错误吗

谢谢

app.json:

{
/**
 * The application's namespace, used by Sencha Command to generate classes
 */
"name": "axis3",

/**
 * The file path to this application's front HTML document, relative to this app.json file
 */
"indexHtmlPath": "index.html",

/**
 * The absolute URL to this application in development environment, i.e: the URL to run this application
 * on your web browser during development, e.g: "http://localhost/myapp/index.html".
 *
 * This value is needed when build to resolve your application's dependencies if it requires server-side resources
 * that are not accessible via file system protocol.
 */
"url": 'http://sub.domain.net/folder/',

/**
 * List of all JavaScript assets in the right execution order.
 * Each item is an object with the following format:
 *      {
 *          "path": "path/to/script.js" // Path to file, if local file it must be relative to this app.json file
 *          "remote": true              // (Optional)
 *                                      // - Defaults to undefined (falsey) to signal a local file which will be copied
 *                                      // - Specify true if this file is a remote file which will not to be copied
 *          "update": "delta"           // (Optional)
 *                                      //  - If not specified, this file will only be loaded once, and
 *                                      //    cached inside localStorage until this value is changed.
 *                                      //  - "delta" to enable over-the-air delta update for this file
 *                                      //  - "full" means full update will be made when this file changes
 *          "x-bootstrap": true         // (Optional)
 *                                      // Indicates a development mode only dependency.  
 *                                      // These files will not be copied into the build directory or referenced
 *                                      // in the generate app.json manifest for the micro loader.
 *
 *      }
 */
"js": [

    {
        "path": "touch/sencha-touch-all.js",
        "x-bootstrap": true
    },

    {
        "path": "app.js",
        "bundle": true,  /* Indicates that all class dependencies are concatenated into this file when build */
        "update": "delta"
    },
    {
        "path": "touch/src/chart/theme/Base.js"},
    {
        "path": "touch/src/chart/series/Series.js"},
    {
        "path": "scripts/myscripts.js",
        "update": "delta"
    },
    {
        "path": "scripts/jquery.js",
        "update": "delta"
    }

],

/**
 * List of all CSS assets in the right inclusion order.
 * Each item is an object with the following format:
 *      {
 *          "path": "path/to/item.css" // Path to file, if local file it must be relative to this app.json file
 *          "remote": true             // (Optional)
 *                                     // - Defaults to undefined (falsey) to signal a local file which will be copied
 *                                     // - Specify true if this file is a remote file which will not to be copied
 *          "update": "delta"          // (Optional)
 *                                     //  - If not specified, this file will only be loaded once, and
 *                                     //    cached inside localStorage until this value is changed to either one below
 *                                     //  - "delta" to enable over-the-air delta update for this file
 *                                     //  - "full" means full update will be made when this file changes
 *
 *      }
 */
"css": [
    {
        "path": "resources/css/app.css",
        "update": "delta"
    },
     {
        "path": "resources/css/bespoke.css",
        "update": "delta"
    }
],

/**
 * Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
 */
"appCache": {
    /**
     * List of items in the CACHE MANIFEST section
     */
    "cache": [
        "index.html",
        "resources/css/bespoke.css",
        "resources/css/app.css",
        "scripts/myscripts.js",
        "app/view/Login.js",
        "app/view/LoginTablet.js",
        "app/view/LoginPhone.js",
        "app/view/Main.js",
        "app/controller/Login.js",
        "app/store/Companies.js",
        "app/profile/Desktop.js",
        "app/profile/Phone.js",
        "app/profile/Tablet.js",
        "app/model/Columns.js",
        "app/model/Companies.js",
        "app/model/Gauges.js",
        "app/model/loginModel.js",
        "touch/microloader/development.js"

    ],
    /**
     * List of items in the NETWORK section
     */
    "network": [
        "*"
    ],
    /**
     * List of items in the FALLBACK section
     */
    "fallback": []
},

/**
 * Extra resources to be copied along when build
 */
"resources": [
    "resources/images",
    "resources/icons",
    "resources/startup"
],

/**
 * File / directory name matchers to ignore when copying to the builds, must be valid regular expressions
 */
"ignore": [
    "\.svn$"
],

/**
 * Directory path to store all previous production builds. Note that the content generated inside this directory
 * must be kept intact for proper generation of deltas between updates
 */
"archivePath": "archive",

/**
 * List of package names to require for the cmd build process
 */
"requires": [
    "packagerAndroid"
],

/**
 * Uniquely generated id for this application, used as prefix for localStorage keys.
 * Normally you should never change this value.
 */
"id": "b24fcf41-b1dd-40aa-a83a-31e5e6488412"
}
和packagerAndroid.json

{
    "applicationName": "Appname",
    "applicationId": "co.uk.domain.appname",
    "outputPath": "C:\\android\\apk",
    "versionString": "1.2",
    "versionCode": "12",
    "inputPath": "C:\\wamp\\www\\touch-2.2.1\\axis3",
    "icon": {
        "36": "resources/icons/Icon_Android36.png",
        "48": "resources/icons/Icon_Android48.png",
        "57": "resources/icons/Icon.png",
        "72": "resources/icons/Icon~ipad.png",
        "114": "resources/icons/Icon@2x.png",
        "144": "resources/icons/Icon~ipad@2x.png"
    },
    "configuration": "debug",
    "platform": "android",
    "certificatePath": "C:\\Program Files\\Java\\jdk1.7.0_21\\bin\\alias_name.keystore",
    "certificateAlias": "Android Developer",
    "certificatePassword": "password",
    "permissions": [
        "INTERNET",
        "ACCESS_NETWORK_STATE",
        "ACCESS_FINE_LOCATION",
        "ACCESS_COARSE_LOCATION",
        "CALL_PHONE"
    ],
    "sdkPath": "C:\\android\\sdk",
    "androidAPILevel": "8",
    "orientations": [
        "portrait",
        "portraitUpsideDown"
    ]
}

有趣的是,在我的应用程序文件夹中的命令行中,当我输入
sencha
时,我得到了相同的错误。然而,我肯定有Sencha Cmd。它位于appfolder/touch/cmd

是svn版本控制系统下的sencha命令安装目录吗?请参阅sencha论坛上的以下帖子:

那篇文章提到了你得到的错误,并说可以通过删除所有的.svn目录来修复


读了这篇文章,我可能还建议重新安装Sencha命令;因为这个问题与svn本身没有直接关系,而是与Sencha命令的安装目录的结构被篡改有关。安装时可能会出现某些问题,结构不再正确。

如果缺少某些必需的项目文件,例如git子模块未初始化或ext source文件夹丢失,则可能会出现此问题。确保所有必需的文件都在您的项目文件夹中。

您是否尝试过sencha app build native?您使用的sencha Touch和Command的版本是什么?您可能也应该发布整个
app.json
packager.json
文件。@kevhender-codeadded@kevhender:使用touch 2.2.1和Cmd 3.1.2.342我没有使用任何SVN系统,因此,SVN folderI不知道从头重新安装Sencha命令是否有帮助,如果安装中有额外的文件夹或被篡改,则可能会发生错误。是的。我也读了那个论坛帖子。所以,我安装了Touch2.1.0,生成了新的应用程序,并复制了整个应用程序文件夹。现在我有一个不同的构建错误-Reimius:没有。已成功创建生产版本,但当我尝试在浏览器中查看时,出现错误。见:
{
/**
 * The application's namespace, used by Sencha Command to generate classes
 */
"name": "axis3",

/**
 * The file path to this application's front HTML document, relative to this app.json file
 */
"indexHtmlPath": "index.html",

/**
 * The absolute URL to this application in development environment, i.e: the URL to run this application
 * on your web browser during development, e.g: "http://localhost/myapp/index.html".
 *
 * This value is needed when build to resolve your application's dependencies if it requires server-side resources
 * that are not accessible via file system protocol.
 */
"url": 'http://sub.domain.net/folder/',

/**
 * List of all JavaScript assets in the right execution order.
 * Each item is an object with the following format:
 *      {
 *          "path": "path/to/script.js" // Path to file, if local file it must be relative to this app.json file
 *          "remote": true              // (Optional)
 *                                      // - Defaults to undefined (falsey) to signal a local file which will be copied
 *                                      // - Specify true if this file is a remote file which will not to be copied
 *          "update": "delta"           // (Optional)
 *                                      //  - If not specified, this file will only be loaded once, and
 *                                      //    cached inside localStorage until this value is changed.
 *                                      //  - "delta" to enable over-the-air delta update for this file
 *                                      //  - "full" means full update will be made when this file changes
 *          "x-bootstrap": true         // (Optional)
 *                                      // Indicates a development mode only dependency.  
 *                                      // These files will not be copied into the build directory or referenced
 *                                      // in the generate app.json manifest for the micro loader.
 *
 *      }
 */
"js": [

    {
        "path": "touch/sencha-touch-all.js",
        "x-bootstrap": true
    },

    {
        "path": "app.js",
        "bundle": true,  /* Indicates that all class dependencies are concatenated into this file when build */
        "update": "delta"
    },
    {
        "path": "touch/src/chart/theme/Base.js"},
    {
        "path": "touch/src/chart/series/Series.js"},
    {
        "path": "scripts/myscripts.js",
        "update": "delta"
    },
    {
        "path": "scripts/jquery.js",
        "update": "delta"
    }

],

/**
 * List of all CSS assets in the right inclusion order.
 * Each item is an object with the following format:
 *      {
 *          "path": "path/to/item.css" // Path to file, if local file it must be relative to this app.json file
 *          "remote": true             // (Optional)
 *                                     // - Defaults to undefined (falsey) to signal a local file which will be copied
 *                                     // - Specify true if this file is a remote file which will not to be copied
 *          "update": "delta"          // (Optional)
 *                                     //  - If not specified, this file will only be loaded once, and
 *                                     //    cached inside localStorage until this value is changed to either one below
 *                                     //  - "delta" to enable over-the-air delta update for this file
 *                                     //  - "full" means full update will be made when this file changes
 *
 *      }
 */
"css": [
    {
        "path": "resources/css/app.css",
        "update": "delta"
    },
     {
        "path": "resources/css/bespoke.css",
        "update": "delta"
    }
],

/**
 * Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
 */
"appCache": {
    /**
     * List of items in the CACHE MANIFEST section
     */
    "cache": [
        "index.html",
        "resources/css/bespoke.css",
        "resources/css/app.css",
        "scripts/myscripts.js",
        "app/view/Login.js",
        "app/view/LoginTablet.js",
        "app/view/LoginPhone.js",
        "app/view/Main.js",
        "app/controller/Login.js",
        "app/store/Companies.js",
        "app/profile/Desktop.js",
        "app/profile/Phone.js",
        "app/profile/Tablet.js",
        "app/model/Columns.js",
        "app/model/Companies.js",
        "app/model/Gauges.js",
        "app/model/loginModel.js",
        "touch/microloader/development.js"

    ],
    /**
     * List of items in the NETWORK section
     */
    "network": [
        "*"
    ],
    /**
     * List of items in the FALLBACK section
     */
    "fallback": []
},

/**
 * Extra resources to be copied along when build
 */
"resources": [
    "resources/images",
    "resources/icons",
    "resources/startup"
],

/**
 * File / directory name matchers to ignore when copying to the builds, must be valid regular expressions
 */
"ignore": [
    "\.svn$"
],

/**
 * Directory path to store all previous production builds. Note that the content generated inside this directory
 * must be kept intact for proper generation of deltas between updates
 */
"archivePath": "archive",

/**
 * List of package names to require for the cmd build process
 */
"requires": [
    "packagerAndroid"
],

/**
 * Uniquely generated id for this application, used as prefix for localStorage keys.
 * Normally you should never change this value.
 */
"id": "b24fcf41-b1dd-40aa-a83a-31e5e6488412"
}
{
    "applicationName": "Appname",
    "applicationId": "co.uk.domain.appname",
    "outputPath": "C:\\android\\apk",
    "versionString": "1.2",
    "versionCode": "12",
    "inputPath": "C:\\wamp\\www\\touch-2.2.1\\axis3",
    "icon": {
        "36": "resources/icons/Icon_Android36.png",
        "48": "resources/icons/Icon_Android48.png",
        "57": "resources/icons/Icon.png",
        "72": "resources/icons/Icon~ipad.png",
        "114": "resources/icons/Icon@2x.png",
        "144": "resources/icons/Icon~ipad@2x.png"
    },
    "configuration": "debug",
    "platform": "android",
    "certificatePath": "C:\\Program Files\\Java\\jdk1.7.0_21\\bin\\alias_name.keystore",
    "certificateAlias": "Android Developer",
    "certificatePassword": "password",
    "permissions": [
        "INTERNET",
        "ACCESS_NETWORK_STATE",
        "ACCESS_FINE_LOCATION",
        "ACCESS_COARSE_LOCATION",
        "CALL_PHONE"
    ],
    "sdkPath": "C:\\android\\sdk",
    "androidAPILevel": "8",
    "orientations": [
        "portrait",
        "portraitUpsideDown"
    ]
}