Unanswered: My Sencha Touch 2.0.1.1 Getting Started Notes

Installing sencha touch 2.0.1.1
1. Download Sencha-touch-2.0.1.1-commercial.zip or later.
2. Extract to c:\Dev\sencha-touch
3. Edit c:\Dev\sencha-touch\command\src\module\generate\App\App.json.tpl
Scroll almost all the way down until you find the following peroperty:

4. Change the line "logger": "no" to "logger": false Important: App.json.tpl is just a template used by sencha generate app. If you are following these instructions to get an existing app to build and run in the emulator then you will have to follow steps 3 and 4 by editing your app.json file as well.
5. Install one of 2 patches for stbuild. This applies to sencha touch 2.0.1.1 only.
windows: http://dl.dropbox.com/u/8793605/stbuild.msi
mac: http://dl.dropbox.com/u/8793605/stbuild.pkg

Installing android-sdk
1. Download the android SDK. At the time of writing the installer was called installer_r20-windows.exe: http://developer.android.com/sdk/index.html
2. Execut the installer.
3. The Android SDK Tools Setup screen appears.
4. Click Next.
5. The Java Development Kit detection screen appears. In my case Java SE Development Kit (JDK) version 1.7 was found at location: c:\Program Files(x86)\Java\jre7\bin\java.exe. If you do not have java installed, the installer is suppose to download and install it for you at this point. Unfortunately it detected a JRE and not a JDK, so in the next section I will download and install the JDK. click Next.
6. The Choose Users screen appears. Since I am the only user, I left the default selection: "Install just for me". Click Next.
7.The "Choose Install Location" screen appears. I chose to install it at c:\Dev\android-sdk. Click Next.
8.The "Choose Start Menu Folder" appears. Click Install.
9. The "Installation Complete" screen appears. Click Next.
10. The "Completing the Android SDK Tool Setup Wizard" screen appears. Leave the "start SDK Manager" checkbox checked. Click Finish.
11. The Android SDK Manager appears.
12. In the Packages pane check:
- Tools->Android SDK Platform-tools.
- Android 4.1 (API 16) or whatever API you need.
- Extras -> Google USB Driver //I am not sure if this is required.
13. Click the Install packages... button.
14. The Choose Packags to Install dialog appears. Select the "Accept All" radio button. Click Install.
15. The Android SDK Manager log appears and the packages are downloaded and installed. This can take a long time. Time for a coffee break.
16. Add C:\Dev\android-sdk\platform-tools to the PATH Environment Variable

Install JDK
1. Download the latest JDK. In my case this is Java SE Development Kit 7. I am not sure if I should download the 64-bit version, or the 32-bit version. So I am just going to download the 32-bit version because I am guessing that is a safe bet. For me this was jdk-7u5-windows-i586.exe.
2. Execute the installer and follow the instructions until the JDK is installed. I never installed JavaFX.
3. Create Environment Variable: JAVA_HOME, value: C:\Program Files (x86)\Java\jdk1.7.0_05
4. Add %JAVA_HOME%\bin;%JAVA_HOME%\lib to PATH.

Generate your first app
1. From the command line:
cd c:\Dev\sencha-touch
c:\Dev\sencha-touch> sencha generate app GS ../GS
2. edit c:\GS\packager.json
3. At the top of the file following the opening curly brace '{' add the following line:
"versionCode":"1",
4. Please note the use of double backslash in path because this is important. Find and set the following properties
"platform":"AndroidEmulator",
"certificatePath":"debug.keystore",
"sdkPath":"c:\\Dev\\android-sdk",
"androidAPILevel":"16",

Congradulations, your Getting started app should now be running in an android emulator. You will have to swipe into android (unlock it) to see the app running. To uninstall the app just type the following at the command prompt:
c:\Dev> adb uninstall com.mycompany.myAppID
Note: com.mycompany.myAppID was taken from packager.json "applicationId":"com.mycompany.myAppID",

I hope that helps someone out there.

Sincerely,
dustfinger.

Last edited by dustfinger; 6 Jul 2012 at 12:05 PM.
Reason: Added an important note in red.

Step ahead

I have followed your getting started notes and now i get compiled both debug and release .apk.
That is great for me.
But in both cases (on AVD , and on my Galaxy note ) just start microloader and hang on . .
If someone know what have to do ....
Thanks anyway

You should see your android avd running in the upper left pane. In the bottom pane you should see messages from the avd being logged.

Start your app in the avd.

Wait until your app hangs.

Click Device-->File Explore

Select all the files under data\anr\. You might see files titled traces.txt, s00.txt, s01.txt etc.

Click the Pull File from Device icon. The icon depicts a floppy disc with an arrow pointing to the left. Save the files to an appropriate location.

Using your favorite text editor, open the files and look for logs pertaining to your app. You may also want to simply look through the messages displayed in the DDM. Hopefully you will find something that clues you into what is happening. Let me know what you find.

It is working.

I just have done. Thanks again. Reason for hanging on microloader is that looking for logger.js , but when changed in app.json.tpl form 'no' to 'false' and generated from scratch, IT IS WORKING.

Many thanks for all .
Any way , why 2-3 months no one posted note like that. I have read that many have such of problem .
I have Almost gived up. I like EXT JS . I'm shure sencha will my favorite framewok next year .

Install JDK
1. Download the latest JDK. In my case this is Java SE Development Kit 7. I am not sure if I should download the 64-bit version, or the 32-bit version. So I am just going to download the 32-bit version because I am guessing that is a safe bet. For me this was jdk-7u5-windows-i586.exe.
2. Execute the installer and follow the instructions until the JDK is installed. I never installed JavaFX.
3. Create Environment Variable: JAVA_HOME, value: C:\Program Files (x86)\Java\jdk1.7.0_05
4. Add %JAVA_HOME%\bin;%JAVA_HOME%\lib to PATH.

Hi Dustfinger,

First of all, thanks for sharing and telling us your steps as described above.
I got also problems when compiling into Android Apps.
I would like to generate my app into Android 2.3. Unfornately I got a lot of errors!
So I am trying to follow your steps one-by-one.

As I am not famous in Java, I miss a little bit detailed steps about Installing JDK at point 3 and 4.
Can you tell me where I have to set this environment?

After this, I can start trying to generate my first android app... hope this will works.

feedback

hey dustfinger. Hey thanks a lot man. It helped me seriously. i have just gived up boss. But one more thing . if i want to create the standalone apk then what is the command to be fired from the command line ? Any ways Thanks again for the help. thanks deepak