Davor Zubak
Davor Zubak

Reputation: 4746

Android packaging with sencha touch 2 sdk tools?

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

Upvotes: 2

Views: 5452

Answers (3)

ssaltman
ssaltman

Reputation: 3713

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.

Upvotes: 1

Shree
Shree

Reputation: 11

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.

Upvotes: 1

Alexander Voloshyn
Alexander Voloshyn

Reputation: 924

  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"

Upvotes: 1

Related Questions