我已经在我的Ubuntu 14.04上安装了所有必需的sencha软件,然后安装了sencha docs
然后我用:
生成一个应用程序$ mkdir MyApp
$ cd MyApp
$ sencha -sdk /path/to/touch generate app MyApp .
关注sencha first app docs并更改MyApp的内容,之后使用此命令构建它:$sencha app build
,然后创建名为androidsim.json
的android模拟器包装程序json。
{
"applicationName":"MyApp",
"applicationId":"com.test.myapp.app",
"versionString":"1.0",
"versionCode":"1",
"icon": {
"36":"resources/icons/Icon_Android36.png",
"48":"resources/icons/Icon_Android48.png",
"57":"resources/icons/Icon.png"
},
"inputPath":"/path/to/MyApp/",
"outputPath":"/path/to/MyApp/build/",
"configuration":"Debug",
"platform":"AndroidSimulator",
"notificationConfiguration":"debug",
"sdkPath":"/path/to/android-sdks", //mention the SDK path on your system
"androidAPILevel":"20",
"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE",
"RECORD_AUDIO",
"RECORD_VIDEO",
"READ_CONTACTS",
"WRITE_CONTACTS",
"ACCESS_NETWORK_STATE"
],
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
但在我运行sencha app package run androidsim.json
后,我在sencha building doc之后收到错误[ERR] Unknown command: "package"
。
感谢您的帮助:/