Good day, i just want to share on how i successfully build Sencha Touch Application for Android (.Apk) devices.


Below are the steps:


Requirements:
1. Install Phonegap on CMD: download first nodeJS then execute npm install -g phonegap on command prompt - http://phonegap.com/install/
2. Download Android SDK : http://developer.android.com/sdk/index.html
3. Download Sencha Touch 2.1 : http://www.sencha.com/products/touch/download/
4. Download and Install Sencha CMD 3.0 beta : http://www.sencha.com/products/sencha-cmd/download
5. Download ANT : http://ant.apache.org/
6. Java SDK






Building Sencha Touch 2 + Phonegap Application to .APK Android file Steps:
1. Cd to Sencha Touch SDK Folder(sencha touch 2.2.1) then Create Sencha Touch Project in Command Prompt : Sencha generate app AppNAme Path
ex:
Code:
sencha generate app Device C:\MobileProject\Device
2. cd on created project folder then package it by :
Code:
 sencha app build package
3. Create Phonegap Android Project by cd on
Code:
C:\phonegap-2.9.0\lib\android\bin
then type create.bat <path> <appid> <appname>
eg:
Code:
create.bat C:\MobileProject\Device\build\Device\android com.company.Device Device
4. Update Android Project for ant to be working android update project --name <project_name> --target <target_ID>
--path <path_to_your_project> on default Users\yourname path on cmd
to check available target type android target list
eg:
Code:
android update project --name Device --target 1 --path C:\MobileDeviceProject\Device\build\Device\android
5. Now copy cordova js from C:\MobileProject\Device\build\Device\android\assets\www to your sencha touch default project folder and add cordova.js to app.json
Code:
{ "path": "cordova.js"}
then build package again
Now edit build.xml on Sencha Project then add
Code:
<target name="-after-build">
<!--Delete content og android web root -->
<delete dir="${build.dir}/android/assets/www"/>




<copy todir="${build.dir}/android/assets/www">
<fileset dir="${build.dir}/package"/>
</copy> </target>
Step 6: Create apk file. By cd on C:\MobileProject\Device\build\Device\android then type
ex:
Code:
ant debug && adb install -r ./bin/MyApp-debug.apk



Regards.




Online Reference:
http://robertcorvus.com/how-to-reall...negap-to-work/
http://vimeo.com/55335529
http://stackoverflow.com/questions/5...y-on-windows-7
https://baach.de/Members/jhb/setting...e-command-line