1

我正在尝试构建本机应用程序以部署在 android 中。我已经按照Sencha 指南安装了所有需要的软件/工具。我正在使用 SenchaCMD 版本 3.0.2

运行时sencha app build production一切顺利。做本机应用程序部分时会出现问题。这是错误日志和我的 packager.json 配置。请让我知道我哪里出错了。

Sencha Cmd v3.0.2.288
[INF]       
[INF]       init-properties:
[INF]       
[INF]       init-sencha-command:
[INF]       
[INF]       init:
[INF]       
[INF]       -before-app-build:
[INF]       
[INF]       app-build-impl:
[INF]       
[INF]       native:
[INF]       
[INF]       -before-init-local:
[INF]       
[INF]       -init-local:
[INF]       
[INF]       -after-init-local:
[INF]       
[INF]       init-local:
[INF]       
[INF]       find-cmd:
[INF]       
[INF]       -before-init:
[INF]       
[INF]       -init:
[INF]       
[INF]       -after-init:
[INF]       
[INF]       init:
[INF]       
[INF]       -before-build:
[INF]       
[INF]       sass:
[INF]       
[INF]       -before-sass:
[INF]       
[INF]       -sass:
[INF]       [shellscript] identical ../css/app.css 
[INF]       
[INF]       -after-sass:
[INF]       
[INF]       page:
[INF]       
[INF]       -before-page:
[INF]       
[INF]       -page:
[INF]       building application
[INF]       Deploying your application to /opt/lampp/htdocs/Revilo/build/Revilo/package
[INF]       Copied /opt/lampp/htdocs/Revilo/./app.js to /opt/lampp/htdocs/Revilo/build/Revilo/package/app.js
[INF]       Copied /opt/lampp/htdocs/Revilo/./resources/css/app.css to /opt/lampp/htdocs/Revilo/build/Revilo/package/resources/css/app.css
[WRN]       File or folder /opt/lampp/htdocs/Revilo/./resources/images not found
[INF]       Copied /opt/lampp/htdocs/Revilo/./resources/icons
[INF]       Copied /opt/lampp/htdocs/Revilo/./resources/startup
[INF]       Resolving your application dependencies (file:////opt/lampp/htdocs/Revilo/./index.html)
[INF]       Compiling app.js and dependencies
[INF]       Processing classPath entry : /opt/lampp/htdocs/Revilo/sencha-compile-temp-dir
[INF]       Processing classPath entry : /opt/lampp/htdocs/Revilo/touch/src
[INF]       Processing classPath entry : /opt/lampp/htdocs/Revilo/app.js
[INF]       Processing classPath entry : /opt/lampp/htdocs/Revilo/app
[INF]       Processing class inheritance graph
[INF]       Processing instantiation refereces to classes and aliases
[INF]       Processing source dependencies
[INF]       Concatenating output to file /opt/lampp/htdocs/Revilo/build/Revilo/package/app.js
[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 /opt/lampp/htdocs/Revilo/build/Revilo/native ...
[ERR]       
[ERR]       BUILD FAILED
[ERR]       com.sencha.exceptions.BasicException: The following error occurred while executing this line:
[ERR]       /opt/lampp/htdocs/Revilo/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped java.lang.UnsupportedOperationException: stbuild is not yet supported on linux (x-app-build#480)
[ERR]          [anonymous] (x-app-build:480)
[ERR]          each (/root/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
[ERR]          runAppBuild (x-app-build:286)
[ERR]          [anonymous] (x-app-build:545)
[ERR]          x_app_build (x-app-build:543)
[ERR]          <script> (anonymous:1)
[ERR]           at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
[ERR]           at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR]           at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]           at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:182)
[ERR]           at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:69)
[ERR]           at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:22)
[ERR]           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERR]           at java.lang.reflect.Method.invoke(Method.java:601)
[ERR]           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR]           at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]           at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]           at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR]           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR]           at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR]           at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR]           at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR]           at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR]           at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR]           at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:94)
[ERR]           at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:98)
[ERR]           at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:142)
[ERR]           at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:116)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERR]           at java.lang.reflect.Method.invoke(Method.java:601)
[ERR]           at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR]           at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]           at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]           at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR]       Caused by: /opt/lampp/htdocs/Revilo/.sencha/app/build-impl.xml:144: The following error occurred while executing this line:
[ERR]       /opt/lampp/htdocs/Revilo/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped java.lang.UnsupportedOperationException: stbuild is not yet supported on linux (x-app-build#480)
[ERR]          [anonymous] (x-app-build:480)
[ERR]          each (/root/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
[ERR]          runAppBuild (x-app-build:286)
[ERR]          [anonymous] (x-app-build:545)
[ERR]          x_app_build (x-app-build:543)
[ERR]          <script> (anonymous:1)
[ERR]           at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
[ERR]           at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
[ERR]           at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[ERR]           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR]           at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
[ERR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERR]           at java.lang.reflect.Method.invoke(Method.java:601)
[ERR]           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR]           at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]           at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]           at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR]           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR]           at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR]           at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR]           at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR]           at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR]           at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR]           at com.sencha.command.ant.AntCommand.execute(AntCommand.java:75)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERR]           at java.lang.reflect.Method.invoke(Method.java:601)
[ERR]           at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR]           ... 31 more
[ERR]       Caused by: /opt/lampp/htdocs/Revilo/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped java.lang.UnsupportedOperationException: stbuild is not yet supported on linux (x-app-build#480)
[ERR]          [anonymous] (x-app-build:480)
[ERR]          each (/root/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
[ERR]          runAppBuild (x-app-build:286)
[ERR]          [anonymous] (x-app-build:545)
[ERR]          x_app_build (x-app-build:543)
[ERR]          <script> (anonymous:1)
[ERR]           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
[ERR]           at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]           at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]           at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR]           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR]           at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[ERR]           at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR]           at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[ERR]           ... 52 more
[ERR]       Caused by: com.sencha.exceptions.ExScript: Wrapped java.lang.UnsupportedOperationException: stbuild is not yet supported on linux (x-app-build#480)
[ERR]          [anonymous] (x-app-build:480)
[ERR]          each (/root/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
[ERR]          runAppBuild (x-app-build:286)
[ERR]          [anonymous] (x-app-build:545)
[ERR]          x_app_build (x-app-build:543)
[ERR]          <script> (anonymous:1)
[ERR]           at com.sencha.util.JavaScriptHost.eval(JavaScriptHost.java:74)
[ERR]           at com.sencha.ant.ScriptTask.executeScript(ScriptTask.java:92)
[ERR]           at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
[ERR]           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR]           at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
[ERR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERR]           at java.lang.reflect.Method.invoke(Method.java:601)
[ERR]           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR]           ... 59 more
[ERR]       Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.UnsupportedOperationException: stbuild is not yet supported on linux (x-app-build#480)
[ERR]           at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
[ERR]           at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
[ERR]           at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
[ERR]           at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
[ERR]           at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
[ERR]           at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
[ERR]           at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
[ERR]           at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
[ERR]           at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
[ERR]           at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
[ERR]           at com.sencha.util.JavaScriptHost.eval(JavaScriptHost.java:67)
[ERR]           ... 66 more
[ERR]       Caused by: java.lang.UnsupportedOperationException: stbuild is not yet supported on linux
[ERR]           at com.sencha.tools.external.StBuildRunner.run(StBuildRunner.java:27)
[ERR]           at com.sencha.tools.external.BaseExternalCommandRunner.run(BaseExternalCommandRunner.java:90)
[ERR]           at com.sencha.tools.external.BaseExternalCommandRunner.run(BaseExternalCommandRunner.java:94)
[ERR]           at sun.refl
[ERR]       ect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR]           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERR]           at java.lang.reflect.Method.invoke(Method.java:601)
[ERR]           at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
[ERR]           ... 75 more
[ERR]       
[ERR]       Total time: 1 minute 29 seconds
[ERR]       com.sencha.exceptions.BasicException: The following error occurred while executing this line:

我的packager.json文件配置:(注意我已经包含了我的 android SDK 路径。)

{
    /**
     * @cfg  applicationName
     * @required
     * This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
     * the name of your application in the Apple Provisioning Portal.
     */
    "applicationName":"Revilo Era",

    /**
     * @cfg  applicationId
     * This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
     */
    "applicationId":"com.mycompany.myAppID",

    /**
     * @cfg  versionString
     * @required
     * This is the version of your application.
     */
    "versionString":"1.0",

    /**
     * @cfg  iconName
     * This is file name of your icon. This should be in the same directory of this configuration file.
     *
     * For iOS, please refer to their documentation about icon sizes:
     * https://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
     *
     * For Android, please refer to the Google Launcher icons guide:
     * http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
     */
    "iconName":"resources/icons/Icon~ipad.png",

    /**
     * @cfg  inputPath
     * @required
     * This is location of your Sencha Touch 2 application, relative to this configuration file.
     */
    "inputPath":"build/native",

    /**
     * @cfg  outputPath
     * @required
     * This is where the built application file with be saved.
     */
    "outputPath":"build/",

    /**
     * @cfg  configuration
     * @required
     * This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
     * store - in which case `Release` should be specified.
     */
    "configuration":"Debug",

    /**
     * @cfg  platform
     * @required
     * This is the platform where you will be running your application. Available options are:
     *  - iOSSimulator
     *  - iOS
     *  - Android
     *  - AndroidEmulator
     */
    "platform":"Android",

    /**
     * @cfg  deviceType
     * @required
     * This is device type that your application will be running on.
     *
     * If you are developing for Android, this is not necessary.
     *
     * Available options are:
     *  - iPhone
     *  - iPad
     *  - Universal
     */
    "deviceType":"Universal",

    /**
     * @cfg  certificatePath
     * This is the location of your certificate.
     * This is required when you are developing for Android or you are developing on Windows.
     */
    "certificatePath":"/path/to/certificate.file",

    /**
     * @cfg  certificateAlias
     * This is the name of your certificate.
     *
     * IF you do not specify this on OSX, we will try and automatically find the certificate for you using the applicationId.
     *
     * This can be just a simple matcher. For example, if your certificate name is "iPhone Developer: Robert Dougan (ABCDEFGHIJ)", you
     * can just put "iPhone Developer".
     *
     * When using a certificatePath on Windows, you do not need to specify this.
     */
    "certificateAlias":"",

    /**
     * @cfg  sdkPath
     * This is the path to the Android SDK, if you are developing an Android application.
     */
    "sdkPath":"/opt/adt-bundle-linux-x86_64/sdk",

    /**
     * @cfg  androidAPILevel
     * This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/appendix/api-levels.html.
     * Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
     */
    "androidAPILevel":"15",

    /**
     * @cfg {Array[String]} orientations
     * @required
     * This is orientations that this application can run.
     */
    "orientations": [
        "portrait",
        "landscapeLeft",
        "landscapeRight",
        "portraitUpsideDown"
    ]
}

非常感谢您的意见。谢谢你。

4

1 回答 1

0

不幸的是,正如错误所述:

stbuild is not yet supported on linux (x-app-build#480)

Linux 不支持用于生成本机应用程序的 stbuild。

于 2013-02-12T21:07:40.567 回答