博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
第二步 (仅供参考) sencha touch 使用cmd打包apk
阅读量:7078 次
发布时间:2019-06-28

本文共 4431 字,大约阅读时间需要 14 分钟。

最新版本的cmd可以直接将sencha touch项目打包成本地应用,不过还有很多不足,本文仅供参考

通过sencha app build native命令可以直接将项目打包成本地应用,不过在命令运行前需要修改项目中的packager.json文件,不然无法正确打包。

配置如下:

1 {  2     /**  3      * @cfg  applicationName  4      * @required  5      * 你的应用程序名称,只能是英文  6      */  7     "applicationName": "jy110",  8   9     /** 10      * @cfg  applicationId 11      * 你的应用的命名空间 12      */ 13     "applicationId": "com.jy110", 14  15     /** 16      * @cfg  bundleSeedId 仅iOS 17      * A ten character string which stands before aplication ID in Apple Provisioning Portal 18      */ 19     "bundleSeedId": "KPXFEPZ6EF", 20  21     /** 22      * @cfg  versionString 23      * @required 24      * 版本号 25      */ 26     "versionString": "1.0", 27  28     /** 29      * @cfg  versionCode 30      * @required 31      * 应用内部版本号(整数) 32      */ 33     "versionCode": "1", 34  35     /** 36      * @cfg  icon 37      * IOS应用图标,参考资料 38      * https://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html 39      * 40      * Android应用图标,参考资料 41      * http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html 42      * iOS 使用 57, 72, 114 和 144; Android 使用 36, 48 和 72;如果你打包安卓可以忽略ios的配置 43      */ 44     "icon": { 45         "36": "resources/icons/icon.png", 46         "48": "resources/icons/icon.png", 47         "57": "resources/icons/icon.png", 48         "72": "resources/icons/icon.png", 49         "114": "resources/icons/icon.png", 50         "144": "resources/icons/icon.png" 51     }, 52  53     /** 54      * @cfg  inputPath 55      * @required 56      * 这是你的应用程序的位置,相对于这个配置文件。 57      */ 58     "inputPath": "./", 59  60     /** 61      * @cfg  outputPath 62      * @required 63      * 应用输出路径。确保输出路径是不是在你的输入路径,否则会陷入死循环 64      */ 65     "outputPath": "../build/", 66  67     /** 68      * @cfg  configuration 69      * @required 70      *  配置你的应用程序。 71      * `Debug`调试模式 72      *  Release 正式发布 73      */ 74     "configuration": "Debug", 75  76     /** 77      * @cfg  platform 78      * @required 79      * 在这里,您将运行应用程序的平台。可用选项有: 80      *  - iOSSimulator iOS模拟器 81      *  - iOS  82      *  - Android  83      *  - AndroidEmulator Android模拟器 84      */ 85     "platform": "Android", 86  87     /** 88      * @cfg  deviceType 89      * @required 90      * 你的应用程序运行设备类型。 91      * 92      * 如果你开发安卓应用,不用配置 93      * 94      * Available options are: 95      *  - iPhone 96      *  - iPad 97      *  - Universal 98      */ 99     "deviceType": "Universal",100 101     /**102      * @cfg  certificatePath103      * 证书路径,可以是相对路径也可以是绝对路径。104      * Android开发必须。105      */106     "certificatePath": "../key.store",107 108     /**109      * @cfg  certificateAlias110      *这是您的证书名称。111      *    112      *如果您还没有在OSX上注明这一点,我们将尝试自动为你找到使用applicationID执行证书。113      *114      *这只是一个简单的匹配。例如,如果您的证书名称为“iPhone开发:罗伯特·杜根(ABCDEFGHIJ)”,你115      *可以只把“iPhone开发”。116      *117      *当使用Windows上的certificatePath,你不需要指定。118      */119     "certificateAlias": "cloudMarket",120     /**121      * @cfg  certificatePassword122      * 这是证书导出过程中指定的密码123      */124     "certificatePassword": "******",125     /**126      * @cfg  provisionProfile127      * 个人资料路径(APP_NAME.mobileprovision),你可以创建,然后从苹果公司的供应门户下载128      */129     "provisionProfile": "",130     /**131      * @cfg  notificationConfiguration132      * 推送通知的通知的配置,可以是“debug”,“release”或为空,如果你不使用推送通知在您的项目。133      */134     "notificationConfiguration": "",135     /**136      * @cfg  sdkPath137      * 如果你正在开发一个Android应用程序,Android的SDK路径138      */139     "sdkPath": "F:/adt-eclipse/sdk",140 141     /**142      * @cfg  androidAPILevel143      * 这是android的API级别,关资料:http://developer.android.com/guide/appendix/api-levels.html。144      * 必须安装Android SDK管理器145      */146     "androidAPILevel": "8",147 148     /**149      * @cfg {Array[String]} permissions150      * 应用程序的权限列表(仅Android)151      * 参考资料:http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES152      */153     "permissions": ["INTERNET", "ACCESS_NETWORK_STATE", "CAMERA", "VIBRATE", "ACCESS_FINE_LOCATION", "ACCESS_COARSE_LOCATION", "CALL_PHONE"],154 155     /**156      * @cfg {Array[String]} orientations157      * @required158      * 屏幕控制。159      */160     "orientations": ["portrait"]161 }

 然后就能在build目录下看到打包后的apk,如图:

通过这种打包的apk没有启动图片,应用名称也不支持中文,还带有应用标题栏,可以参照下面的文章做一些修改。我也会查阅其他资料看看

反编译sencha toucha打包的apk文件,修改应用名称支持中文以及去除应用标题栏p>

转载地址:http://xdpml.baihongyu.com/

你可能感兴趣的文章
DWR入门教程
查看>>
ZooKeeper异常
查看>>
SQL 语句Left join/Right join/inner join的学习讲解
查看>>
如何查看某个软件包的依赖关系
查看>>
XenDesktop7-基于Exsi5.1.0部署
查看>>
技术人员为什么创业失败的多?
查看>>
让IE正常下载的时候不必弹出下载提示框
查看>>
开启 NFS 文件系统提升 Vagrant 共享目录的性能
查看>>
Python 2.7和3.4 requests 报 No module named 'zlib'
查看>>
Fragment与自定义布局实现类似tab的效果
查看>>
Centos7
查看>>
cisco *** 学习笔记--第四天
查看>>
2014第2周
查看>>
删除N天前日志
查看>>
my.cnf 详解与优化
查看>>
我的友情链接
查看>>
二维指针——改变动态申请的空间大小
查看>>
静态路由实验题
查看>>
NTP white paper
查看>>
Cisco 3750 802.1x认证失败跳转vlan的配置
查看>>