2012-12-10 26 views
0

我尝试使用本教程构建适用于Android平台的示例Sencha应用程序:http://docs.sencha.com/touch/2-0/#!/guide/native_android构建一个Android Sencha触摸应用程序:对于“构建”目录的路径太长

我做的所有步骤(1,2,3),现在试图建立一个* .apk文件:

sencha --debug package build config.json 

我有一个奇怪的输出,其中有一个尝试访问非常长的路与重复片段“\ assets \ build”:

C:\all\GS\build\\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\app\controller\C:\all\GS\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\app\controller\ 

有谁知道为什么它应该发生?似乎很奇怪,这条路一开始有两条反斜杠,但我不知道为什么。

我config.json是:

{ 
    /** 
    * @cfg {String} 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":"FirstApp", 

    "iconName": "C:/all/GS/resources/icons/Icon.png", 

    /** 
    * @cfg {String} 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.ergosolo.firstApp", 

    /** 
    * @cfg {String} bundleSeedId 
    * A ten character string which stands before aplication ID in Apple Provisioning Portal 
    */ 
    "bundleSeedId":"KPXFEPZ6EF", 

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

    /** 
    * @cfg {Integer} versionCode 
    * @required 
    * This is the integer version code of your application, or you can refer to it as a build number. Used only for Android builds. 
    */ 
    "versionCode":"1", 

    /** 
    * @cfg {Object} icon 
    * 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 
    */ 
    "icon": { 
     "57":"resources/icons/Icon.png", 
     "72":"resources/icons/Icon~ipad.png", 
     "114":"resources/icons/[email protected]", 
     "144":"resources/icons/[email protected]" 
    }, 

    /** 
    * @cfg {String} inputPath 
    * @required 
    * This is location of your Sencha Touch 2 application, relative to this configuration file. 
    */ 
    "inputPath":"C:/all/GS", 

    /** 
    * @cfg {String} outputPath 
    * @required 
    * This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying 
    */ 
    "outputPath":"C:/all/GS/build", 

    /** 
    * @cfg {String} 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 {String} platform 
    * @required 
    * This is the platform where you will be running your application. Available options are: 
    * - iOSSimulator 
    * - iOS 
    * - Android 
    * - AndroidEmulator 
    */ 
    "platform":"AndroidEmulator", 

    /** 
    * @cfg {String} 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 {String} certificatePath 
    * This is the location of your certificate. 
    * This is required when you are developing for Android or you are developing on Windows. 
    */ 
    "certificatePath":"C:/all/GS/my-debug-key.keystore", 

    /** 
    * @cfg {String} 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. 
    */ 
    "certificatePassword":"", 
    /** 
    * @cfg {String} certificatePassword 
    * The password which was specified during certificate export 
    */ 
    "provisionProfile":"", 
    /** 
    * @cfg {String} provisionProfile 
    * The path to the provision profile (APP_NAME.mobileprovision) which you can create and then download from Apple's provisioning portal 
    */ 
    "sdkPath":"C:/Users/sergzach/Desktop/adt-bundle-windows-x86/adt-bundle-windows-x86/sdk", 

    /** 
    * @cfg {String} sdkPath 
    * This is the path to the Android SDK, if you are developing an Android application. 
    */ 

    /** 
    /** 
    * @cfg {String} 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":"17", 

    /** 
    /** 
    * @cfg {Array[String]} permissions 
    * Array of permissions that is used by an application (Android only) 
    * Full list of permissions for Android application can be found here: http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES 
    */ 
    "permissions":[ 
        "INTERNET", 
        "ACCESS_NETWORK_STATE", 
        "CAMERA", 
        "VIBRATE", 
        "ACCESS_FINE_LOCATION", 
        "ACCESS_COARSE_LOCATION", 
        "CALL_PHONE"], 

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

在接下来的调试结束登录它说,它的extention太长。然后它说道路“C:\ all \ GS \ build \ assets \ build \ assets ..”太长了。

The full debug(我手工翻译了它,所以它不能对应确切的英文信息)。

Sencha Cmd v3.0.0.250 
[DBG]  using path C:\Program Files\Sencha\Cmd\3.0.0.250\stbuild;C:\Program Files\Sencha\Cmd\3.0.0.250\stbuild\bin;C:\Program Files\Sencha\Cmd\3.0.0.250;C:\all\sencha-projects;C:\Program Files\SenchaSDKTools-2.0.0-beta3\compat\scripts;C:\Program Files\SenchaSDKTools-2.0.0-beta3\compat\command;C:\Program Files\SenchaSDKTools-2.0.0-beta3\compat\jsbuilder;C:\Program Files\SenchaSDKTools-2.0.0-beta3\bin;C:\Program Files\SenchaSDKTools-2.0.0-beta3;C:\Program Files\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\8.4\bin\;C:\Python26\Scripts;C:\Python26;C:\Program Files\ImageMagick-6.6.7-Q16;C:\all\start;C:\all\trunk\www\cometd\cometd-twisted;C:\Program Files\nodejs\;C:\Users\sergzach\AppData\Roaming\npm\ 
[DBG]  executable located at C:\Program Files\Sencha\Cmd\3.0.0.250\stbuild\stbuild.exe 
[DBG]  using workding directory . 
Error: Project folder 'C:\all\GS\build' is not empty. Please consider using 'android.bat update' instead. 
Updated file C:\all\GS\build\src\com\ergosolo\firstApp\STActivity.java 
Updated file C:\all\GS\build\res\values\strings.xml 
Updated file C:\all\GS\build\res\layout\main.xml 
Updated file C:\all\GS\build\AndroidManifest.xml 
Updated file C:\all\GS\build\build.xml 
Updated file C:\all\GS\build\proguard-project.txt 
Subfolder or file C:\all\GS\build\\assets\ already exists. 
Subfolder or file C:\all\GS\build\\assets\.sencha\ already exists. 
Subfolder or file C:\all\GS\build\\assets\.sencha\app\ already exists. 
Subfolder or file C:\all\GS\build\\assets\.sencha\workspace\ already exists. 
Subfolder or file C:\all\GS\build\\assets\app\ already exists. 
Subfolder or file C:\all\GS\build\\assets\app\controller\ already exists. 
Subfolder or file C:\all\GS\build\\assets\app\model\ already exists. 
Subfolder or file C:\all\GS\build\\assets\app\profile\ already exists. 
Subfolder or file C:\all\GS\build\\assets\app\store\ already exists. 
Subfolder or file C:\all\GS\build\\assets\app\view\ already exists. 
Subfolder or file C:\all\GS\build\\assets\build\ already exists. 
Subfolder or file C:\all\GS\build\\assets\build\assets\ already exists. 
Subfolder or file C:\all\GS\build\\assets\build\assets\.sencha\ already exists. 
Subfolder or file C:\all\GS\build\\assets\build\assets\.sencha\app\ already exists. 
Subfolder or file C:\all\GS\build\\assets\build\assets\.sencha\workspace\ already exists. 
Subfolder or file C:\all\GS\build\\assets\build\assets\app\ already exist. 
...(and so on, truncated) 
The name of the file or it's extention has incorrect length.. 
The name of the file or it's extention has incorrect length.. 
The name of the file or it's extention has incorrect length.. 
The next path is too long: "C:\all\GS\build\\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\app\controller\C:\all\GS\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\build\assets\app\controller\". 
[DBG]  exit code was : -1073741819 
[DBG]  exit code was : -1073741819 

如果我改变outputPath为“构建/”,那么它是非常长的路径相同的输出:C:/所有/ GS \建立\资产\建立\资产\建立\资产...(不在最后一种情况下双斜杠)。

+0

请翻译成英文和发布。 –

+0

@VarunAchar我做到了。 – sergzach

回答

1

问题已修复。 输出'build'目录不应与源文件的目录具有相同的根目录(其中dirs'app','resources','files')