Menu

Building Sencha Touch 2 + Phonegap Application for Android : Ubuntu

August 21, 2014 - sencha touch 2

1) cd  /var/www/touch-2.3.1/

2) sencha generate app Device ../Device

3) cd ../Device

4) sencha app build package

5) Download phonegap to desktop

  cd Desktop/phonegap-2.9.0/lib/android/bin

6) ./create /var/www/Device/build/Device/android com.company.Device Device

7) Now copy cordova js from /var/www/Device/build/Device/android/assets/www to your sencha touch default project folder and add cordova.js to app.json

{ "path": "cordova.js"}

then build package again
Now edit build.xml on Sencha Project then add

<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>
8)Create apk file cd /var/www/Device/build/Device/android
ant debug && adb install -r ./bin/Device-debug.apk

Leave a Reply