Files
CocosCreatorTutorial/HotUpdateDemo/README.md
2019-03-25 16:02:03 +08:00

24 lines
908 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 热更新Demo
> 如果喜欢上[简书](https://www.jianshu.com/u/33b882c6c780)关注我吧。我会不定时更新Cocos Creator教程与上传demo到github
### 准备
* 操作系统window
* 安装Node https://nodejs.org/zh-cn/
* 以下操作都是基于android 打包 且模式为[link](https://docs.cocos.com/creator/manual/zh/publish/publish-native.html?h=link)。
### 操作
* 打开命令行输入:
~~~
npm install
~~~
安装Node的库
* 构建Android 工程 选择link模式
![link](https://upload-images.jianshu.io/upload_images/2315803-f28aec8ccdff1858.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
* 生成热更新文件
进入tools点击version_generator.bat
### 支持https
* 打开工程修改libcocos2dx工程中Cocos2dxDownloader.java类。找到new AsyncHttpClient() 修改成new AsyncHttpClient(true, 80, 443)
* 参考文章https://forum.cocos.com/t/https/52302