1.需要修改的地方:
(1)index.js 和 index.html 文件: 修改屏幕适配的方案:
![](https://img-blog.csdnimg.cn/direct/ae4e0f7e41b64a5fa28ec7e006041e6b.png)
![](https://img-blog.csdnimg.cn/direct/506c50fdf9b94557ad2d8ffe6a07d8ed.png)
(2)修改引擎地方的方案:Main.js
if (window.isApp) {
if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height);
else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]);
} else {
Laya3D.init(0, 0);
}
![](https://img-blog.csdnimg.cn/direct/41290692e5fb43898352567d69fb868c.png)
(3)修改音效和音乐文件:支持ogg或者wav格式
map3格式的文件都转换为wav格式的文件
2.打包需要注意的地方:
![](https://img-blog.csdnimg.cn/direct/d2f01911f5104ce0b805afda294620e0.png)
(1)小游戏一般选择构建apk,之后,这里用Eclipse构建项目,勾选单机版:
![](https://img-blog.csdnimg.cn/direct/c05bf6c22b254a65a411b6f90cc0d125.png)
(2)打开Eclipse,导出项目:
![](https://img-blog.csdnimg.cn/direct/506b6bd056544bbc9c538463839e2fb9.png)
![](https://img-blog.csdnimg.cn/direct/03691f3a97b549b59102d9723a85c6b4.png)
![](https://img-blog.csdnimg.cn/direct/6c66eaf3ff6c4357ac52c9bb3ea9f591.png)
(3)
配置androidSDK:
![](https://img-blog.csdnimg.cn/direct/2dbc51e39ce54c138fd9bbb9dae1299a.png)
sdk配置目录:
![](https://img-blog.csdnimg.cn/direct/8f8de2bfc5e54b4bb1352b3c770f76c8.png)
(4)
修改
project.properties的目标android版本。
![](https://img-blog.csdnimg.cn/direct/308dc20cc33140de950cbded29fa8c2f.png)
(5)项目的修改屏幕适配:
![](https://img-blog.csdnimg.cn/direct/d1f04d73e27f463ea9d4bdbf002fba1d.png)
(6)修改icon和加载图:
![](https://img-blog.csdnimg.cn/direct/a7135ceecb6d41cd9b81b9455b50235d.png)
![](https://img-blog.csdnimg.cn/direct/76278c416ecf4e15aaa500ab3cfc94d2.png)
![](https://img-blog.csdnimg.cn/direct/bfc7d2ed640440c1845fb312e0e67f16.png)
(7)打包APK:
![](https://img-blog.csdnimg.cn/direct/e693b15342084777a3092e6d7cccf4df.png)
解决报错:
![](https://img-blog.csdnimg.cn/direct/8b6e8fdee73c4819a4b9e3dd23d368e9.png)
![](https://img-blog.csdnimg.cn/direct/04313b9491dd4d65bcf65fdea5711f11.png)
sdk.buildtools=25.0.0