2

I am trying to make a .apk from my Sencha Touch 2 app. I am using default mvc app that i got from running sencha command sencha app create MyApp /path/to/www/myapp , in addition to this app, I created debug .keystore from Android SDK. Also I created my own packager.json that is valid JSON. I Downloaded all Android Revisions, including revision 17. I am using Window 7 Ultimate x64 as my platform and Sencha Touch 2.0.0 GPLv3 as framework. My problem is showing when trying to generate .apk with sencha command. sencha package run packager.json.I have tried with android emulator turned on as instructed on Sencha Touch 2 Documentation.

Here is my packager.json, app frame and error image:

Packager.json

{
    "applicationName":"HelenaApp",
    "applicationId":"com.helena",
    "iconName":"icon.png",
    "versionString":"1.0",
    "outputPath":"C:/wamp/www/Helena/HelenaAndroid",
    "inputPath":"C:/wamp/www/Helena",
    "webAppPath":"C:/wamp/www/Helena",
    "androidAPILevel":"13",
    "configuration":"Debug",
    "platform":"AndroidEmulator",
    "deviceType":"Universal",
    "certificatePath":"moj-key.keystore",
    "certificateAlias":"helena",
    "sdkPath":"C:/Android/android-sdk",
    "orientations": [
        "portrait",
        "landscapeLeft",
        "landscapeRight",
        "portraitUpsideDown"
    ]
}

APP

Helena app frame

Error

enter image description here

EDIT: Thanks for answer, seems i got first problem solved, now I got another:

enter image description here

Seems It has something to do with java PATH as seen in this question, any ideas?

EDIT 2:

  1. I edited path to my C:\Program Files\Java\jdk1.7.0_03\bin JDK,
  2. Previous path was path to Sencha SDK
  3. Then I changed it back to Sencha, and i got error in console ERROR: createProcessW

4. Regarding two Java instances, i have jdk7 in Program Files, and jdk6 in Program Files(x86) --(FALSE) 4. I have only one jdk (1.7.0_03)

enter image description here

Community
  • 1
  • 1
Davor Zubak
  • 4,726
  • 13
  • 59
  • 94
  • you don't replace PATH, you need to ADD to existing – Alexander Voloshyn Mar 29 '12 at 19:18
  • @Alexander Voloshyn -I'v modified path and added jdk path, separated by semicoln, still getting ERROR: CreateProcessW - The system cannot find the file specified – Davor Zubak Mar 29 '12 at 19:37
  • try using directly "stbuild package packager.json", that will run packager without sencha command wrapper. – Alexander Voloshyn Mar 29 '12 at 23:06
  • We had something similar and it was related to java installation, what we did is removed all java installations jdk and jde and then installed jdk7, edited PATH variable so it includes "bin" folder of jdk7 and set JAVA_HOME variable also to point to jdk7 folder, after that everything worked fine. – Alexander Voloshyn Apr 24 '12 at 22:44
  • will fix the problem?, how could sign the apk in touch sencha v1? – cmujica May 28 '12 at 18:54

3 Answers3

1

The Problem arises only if the "PATH" variable doesn't contain "C:\Windows\System32". Add this to the path and will solve the CreateProcessW Error on WIndows.

Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
Shree
  • 11
  • 1
1

You need to have JAVA_HOME point to the JDK directory, not /bin in your system variables. (windows) example:

JAVA_HOME C:\Program Files\Java\jdk1.7.0_25

Also, I made the mistake of thinking the JDK was included in Java, which it is not, it needed to be downloaded and installed separately.

ssaltman
  • 3,623
  • 1
  • 18
  • 21
1
  1. You get into recursion, your output folder is inside the input folder, so once you copy file one more is created and so on, all you need to do is to specify your build folder somewhere else and remove it from inputPath
  2. webAppPath was replaced by inputPath and now is ignored, you can remove it from your config safely.
  3. "applicationId":"com.helena" is not valid, you have to have 3 components, for example "com.helena.app"
Alexander Voloshyn
  • 924
  • 2
  • 8
  • 21
  • yes, it's a PATH problem, to fix this right click "My computer", select "properties", click advanced system settings and then in the system properties window click environment variables, then edit PATH variable and add path to the "bin" folder of your java installation, for example: C:\Program Files\Java\jdk1.6.0_16 – Alexander Voloshyn Mar 29 '12 at 18:33
  • Also make sure you have only one jdk installed otherwise there may be conflicts – Alexander Voloshyn Mar 29 '12 at 18:33
  • what errors do you have? are you sure you added java bin path to PATH variable correctly? Did you remove anything from PATH what was already there? Post as much details as you have and we will figure this out – Alexander Voloshyn Mar 29 '12 at 19:03
  • @Alexander Voloshyn i tired this way but im getting blank screen plzz see this.http://stackoverflow.com/questions/11323516/including-sencha-touch-2-in-eclipse – prakash_d22 Jul 04 '12 at 06:38