我是一名新的开发人员,有一个问题令我困惑了两个星期! 我使用sencha CMD通过'sencha app build native'构建本机应用程序然后获得如下所示的进程日志,顺便说一下,在创建文件时有一些乱码,为什么? 请帮助我,非常感谢!!
Sencha Cmd v4.0.1.45
[INF]
[INF] init-plugin:
[INF]
[INF] cmd-root-plugin.init-properties:
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] app-build-impl:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] find-cmd-in-path:
[INF]
[INF] find-cmd-in-environment:
[INF]
[INF] find-cmd-in-shell:
[INF]
[INF] init-cmd:
[INF] [echo] Using Sencha Cmd from D:\senchacmd\Sencha\Cmd\4.0.1.45 for D:\wamp\www\myapp\build.xml
[INF]
[INF] -before-init:
[INF]
[INF] -init:
[INF] Initializing Sencha Cmd ant environment
[INF] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
[INF]
[INF] -after-init:
[INF]
[INF] -before-init-defaults:
[INF]
[INF] -init-defaults:
[INF]
[INF] -after-init-defaults:
[INF]
[INF] -init-compiler:
[INF]
[INF] init:
[INF]
[INF] -before-build:
[INF]
[INF] refresh:
[INF]
[INF] -before-refresh:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -detect-app-build-properties:
[INF] Loading app json manifest...
[INF] Loading classpath entry D:\wamp\www\myapp\touch\src
[INF] Loading classpath entry D:\wamp\www\myapp\app.js
[INF] Loading classpath entry D:\wamp\www\myapp\app
[INF] Loading classpath entry D:\wamp\www\myapp\build\temp\native\myapp\sencha-compiler\app
[INF] Loading classpath entry D:\wamp\www\myapp\build\temp\native\myapp\sencha-compiler\app
[INF] Concatenating output to file D:\wamp\www\myapp/build/temp/native/myapp/sencha-compiler/cmd-packages.js
[INF] Adding external reference : @full-page => @overrides
[INF] Loading classpath entry D:\wamp\www\myapp\build\temp\native\myapp\sencha-compiler\cmd-packages.js
[INF] Adding external reference : Ext.util.Observable => D:\wamp\www\myapp/build/temp/native/myapp/sencha-compiler/cmd-packages.js
[INF]
[INF] -refresh-app:
[INF] Appending concatenated output to file D:\wamp\www\myapp/bootstrap.js
[INF] Appending concatenated output to file D:\wamp\www\myapp/bootstrap.js
[INF] Appending concatenated output to file D:\wamp\www\myapp/bootstrap.js
[INF] Appending concatenated output to file D:\wamp\www\myapp/bootstrap.js
[INF] Appending concatenated output to file D:\wamp\www\myapp/bootstrap.js
[INF] Appending content to D:\wamp\www\myapp/bootstrap.json
[INF]
[INF] -refresh:
[INF]
[INF] -after-refresh:
[INF]
[INF] resolve:
[INF]
[INF] js:
[INF]
[INF] -before-js:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -detect-app-build-properties:
[INF]
[INF] -compile-js:
[INF] Compressing data with YuiJavascriptCompressor
[INF] Concatenating output to file D:\wamp\www\myapp/build/native/myapp/app.js
[INF]
[INF] -js:
[INF]
[INF] -after-js:
[INF]
[INF] resources:
[INF]
[INF] -before-resources:
[INF]
[INF] -before-inherit-resources:
[INF]
[INF] -before-copy-resources:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -resources:
[INF] merging resources into D:\wamp\www\myapp\build\native\myapp\resources
[INF] merged 0 resources into D:\wamp\www\myapp\build\native\myapp\resources
[INF] merging resources into D:\wamp\www\myapp\build\native\myapp
[INF] merged 0 resources into D:\wamp\www\myapp\build\native\myapp
[INF]
[INF] -after-copy-resources:
[INF]
[INF] -after-inherit-resources:
[INF]
[INF] -after-resources:
[INF]
[INF] sass:
[INF]
[INF] -before-sass:
[INF]
[INF] -compass-compile-theme-package:
[INF]
[INF] -compass-compile-theme-folders:
[INF]
[INF] -compass-compile-sass-dir:
[INF] executing compass using system installed ruby runtime
identical ../css/app.css
[INF]
[INF] -compass-compile:
[INF]
[INF] -sass:
[INF]
[INF] -after-sass:
[INF]
[INF] slice:
[INF]
[INF] -before-slice:
[INF]
[INF] -slice-images:
[INF]
[INF] -slice:
[INF]
[INF] -after-slice:
[INF]
[INF] page:
[INF]
[INF] -before-page:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -copy-app-resources:
[INF] Copying page resources to D:\wamp\www\myapp\build\native\myapp
[INF] copying D:\wamp\www\myapp\resources\css\app.css to D:\wamp\www\myapp\build\native\myapp\resources\css\app.css
[INF]
[INF] -generate-deltas:
[INF]
[INF] -detect-app-build-properties:
[INF]
[INF] -build-standalone-json-manifest:
[INF] Writing content to D:\wamp\www\myapp/build/native/myapp/app.json
[INF]
[INF] -build-output-page:
[INF]
[INF] -build-output-microload-page:
[INF] Writing content to D:\wamp\www\myapp/build/native/myapp/microloader.js
[INF] Appending content to D:\wamp\www\myapp/build/native/myapp/microloader.js
[INF] Building output markup to D:\wamp\www\myapp/build/native/myapp/index.html
[INF] [delete] Deleting: D:\wamp\www\myapp\build\native\myapp\microloader.js
[INF]
[INF] -generate-cache-manifest:
[INF]
[INF] -page:
[INF]
[INF] -after-page:
[INF]
[INF] native-package:
[INF]
[INF] -before-native-package:
[INF]
[INF] -native-package-mobile:
[INF] [echo] Building all specified mobile packager configs.
[INF] [echo]
[INF] [echo] Processing Mobile Packager config file
[INF] [echo] config: D:\wamp\www\myapp/packager.json
[INF] [echo] inputPath: D:\wamp\www\myapp/build/native/myapp
[INF] [echo] outputPath: D:\wamp\www\myapp/build/native-package-mobile/myapp/packager.json
[INF] [echo] Running mobile packager action build on file D:\wamp\www\myapp/packager.temp.json
[ERR]
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\src\com\xiubo\myapp
Added file D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\src\com\xiubo\myapp\STActivity.java
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\values
Added file D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\values\strings.xml
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\layout
Added file D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\layout\main.xml
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\drawable-xhdpi
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\drawable-hdpi
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\drawable-mdpi
Created directory D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\res\drawable-ldpi
Added file D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\AndroidManifest.xml
Added file D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\build.xml
Added file D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\proguard-project.txt
¡Á??????¨°???? D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\\libs\ ??????????
¡Á??????¨°???? D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\\assets\ ??????????
Buildfile: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.3.0
[checkenv] Installed at D:\Program Files\android-sdk-windows\sdk
-setup:
[echo] Project Name: myapp
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.0
[echo] Resolving Build Target for myapp...
[gettarget] Project Target: Android 4.1.2
[gettarget] API level: 16
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\res
[mkdir] Created dir: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\rsObj
[mkdir] Created dir: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\rsLibs
[mkdir] Created dir: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\gen
[mkdir] Created dir: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\classes
[mkdir] Created dir: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for myapp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 3 source files to D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\classes
-post-compile:
-obfuscate:
-dex:
[dex] input: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\classes
[dex] input: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\guava-r09.jar
[dex] input: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\gcm.jar
[dex] input: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\nimblekit.jar
[dex] input: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\commons-codec.jar
[dex] input: D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\sqlcipher.jar
[dex] Pre-Dexing D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\guava-r09.jar -> guava-r09-6b26029ba5c5c64deca7abc18bdbd46a.jar
[dex] Pre-Dexing D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\gcm.jar -> gcm-b67a455e8cf4e7928c0b82a43c0eaf71.jar
[dex] Pre-Dexing D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\nimblekit.jar -> nimblekit-55e21e61378ef4231d2762729fb533e8.jar
[dex] Pre-Dexing D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\commons-codec.jar -> commons-codec-a607d24060085016c6270afbd6fb2bd5.jar
[dex] Pre-Dexing D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\libs\sqlcipher.jar -> sqlcipher-98f481e88e52b1031a529d6932a3c287.jar
[dex] Converting compiled files and external libraries into D:\wamp\www\myapp\build\native-package-mobile\myapp\packager.json\bin\classes.dex...
[dx]
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] java.nio.BufferOverflowException
[dx] at java.nio.Buffer.nextPutIndex(Buffer.java:519)
[dx] at java.nio.HeapByteBuffer.putShort(HeapByteBuffer.java:315)
[dx] at com.android.dex.Dex$Section.writeShort(Dex.java:818)
[dx] at com.android.dex.Dex$Section.writeTypeList(Dex.java:870)
[dx] at com.android.dx.merge.DexMerger$3.write(DexMerger.java:437)
[dx] at com.android.dx.merge.DexMerger$3.write(DexMerger.java:423)
[dx] at com.android.dx.merge.DexMerger$IdMerger.mergeUnsorted(DexMerger.java:317)
[dx] at com.android.dx.merge.DexMerger.mergeTypeLists(DexMerger.java:423)
[dx] at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:163)
[dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
[dx] at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
[dx] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
[dx] at com.android.dx.command.dexer.Main.run(Main.java:230)
[dx] at com.android.dx.command.dexer.Main.main(Main.java:199)
[dx] at com.android.dx.command.Main.main(Main.java:103)
BUILD FAILED
D:\Program Files\android-sdk-windows\sdk\tools\ant\build.xml:892: The following error occurred while executing this line:
D:\Program Files\android-sdk-windows\sdk\tools\ant\build.xml:894: The following error occurred while executing this line:
D:\Program Files\android-sdk-windows\sdk\tools\ant\build.xml:906: The following error occurred while executing this line:
D:\Program Files\android-sdk-windows\sdk\tools\ant\build.xml:284: null returned: 2
Total time: 17 seconds
""D:/Program Files/android-sdk-windows/sdk\tools\android" create project --target android-16 --name myapp --activity STActivity --path "D:\wamp\www\myapp/build/native-package-mobile/myapp/packager.json\/" --package com.xiubo.myapp"
Could not run ant with error: 1
Failed to package application
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: stbuild exited with non-zero code : 7
[ERR] at org.apache.tools.ant.Target.performTasks(Targ
[ERR] et.java:413)
[ERR]
[ERR] Total time: 27 seconds
[ERR] The following error occurred while executing this line:
D:\wamp\www\myapp\.sencha\app\build-impl.xml:422: The following error occurred while executing this line:
D:\wamp\www\myapp\.sencha\app\packager-impl.xml:112: The following error occurred while executing this line:
D:\wamp\www\myapp\.sencha\app\packager-impl.xml:114: The following error occurred while executing this line:
D:\wamp\www\myapp\.sencha\app\packager-impl.xml:98: The following error occurred while executing this line:
D:\wamp\www\myapp\.sencha\app\packager-impl.xml:7: com.sencha.exceptions.ExProcess: stbuild exited with non-zero code : 7
答案 0 :(得分:0)
正确检查您的sdk路径并尝试在packager.json文件中进行操作 并改为 " sdk":" D:\ Program Files \ android-sdk-windows \ sdk \ tools"