Sencha Touch 2.3 / Cordova : Build run directly on device

南笙酒味 提交于 2019-11-30 09:09:59

问题


I created an app for android with Sencha Touch 2.3 and Cordova. I used the following command to build and run the apk:

sencha app build -run native

However, this runs the app on the emulator but I would like to directly run it on the usb connected android device. Is it possible?

I already tried commands like these but it didn't work.

sencha app build -device native

or sencha app build -run -device native


回答1:


It is possible. There is a difference between Sencha and Cordova commands and both are for different purpose. Once you want to make apk for your android device. Just go through the steps here. But i will advice you to use build of your app to work with in your cordova app.

After making build of your project, Check the following steps:

cordova create yourapp com.example.yourapp YourApp

cd yourapp

cordova platform add android

cordova build android

After this you should copy your project and paste it into the immediate www folder of your cordova project. And then run

cordova run android

NB: sencha app build native

Deploy the .apk file in your emulator or real device to test the app



来源:https://stackoverflow.com/questions/22934104/sencha-touch-2-3-cordova-build-run-directly-on-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!