初次使用Luncher导出安卓工程文件夹
生成一次以后,再次生成的时候即使修改包名,游戏名称也不会生效,只会覆盖里面那些游戏文件。
所以如果要重新修改包名或游戏名可删除整个android文件夹重新生成或者在AndroidStudio中直接修改。
另外,经过这个操作以后工程设定文件egretProperties.json
中会自动添加安卓目标配置,直接修改这里也可以。
Egret Wing编译时指定输出task为安卓代码
修改文件egretProperties.json
修改为(默认为web)
"target": {
"current": "android"
},
工程从安卓模式恢复WEB模式
- Platform.ts
if (!window.platform) {
window.platform = new DebugPlatform();
//window.platform = new AndroidPlatform();
}
- egretProperties.json
"target": {
"current": "web"
},
- Main.ts
var IS_ANDROID_GAME = false;
发布到GooglePlay时提示缺少64位二进制文件
- 编辑build.gradle文件,在abiFilters中添加64位cpu信息
android {
compileSdkVersion 30
defaultConfig {
applicationId "net.mangolovecarrot.mine"
minSdkVersion 15
targetSdkVersion 30
versionCode 3
versionName "1.0"
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
系列文章
版权属于:芒果爱吃胡萝卜
本文链接:http://blog.mangolovecarrot.net/2021/03/31/saolei97
转载时须注明出处及本声明