煎茶触摸2.3 /科尔多瓦:建立直接在设备上运行科尔、直接、多瓦、设备

2023-09-04 13:01:03 作者:[帅得一塌糊涂]

我创建了安卓的应用程序与煎茶触摸2.3和科尔多瓦。我用下面的命令来构建和运行APK:

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

不过,这种运行模拟器上的应用程序,但我想直接在USB连接的Andr​​oid设备上运行它。这可能吗?

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

或     煎茶软件搭建-run -device原生

or sencha app build -run -device native

推荐答案

这是可能的。之间有煎茶和科尔多瓦命令和两者对于不同目的的差。一旦你想的apk为您的Andr​​oid设备。刚刚经过的步骤here.但我会建议你使用你的应用程序的构建与您科尔多瓦应用程序的工作。

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

在此,你应该将项目复制并粘贴到你的科尔多瓦项目的直接WWW文件夹。然后运行

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

注:煎茶软件搭建本地

部署在模拟器中的.apk文件或实际的设备来测试应用程序

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