我正在使用 Cordova (5.1.1) 和 ionic 框架来创建我的 android。但是,当我尝试构建 apk 时,为什么文件名始终是“android-debug.apk”?有什么办法可以重命名吗?
- cordova 创建 hello com.example.hello HelloWorld
- cd hello
- cordova平台添加android
- 科尔多瓦构建安卓
在 hello\config.xml 中,名称标签已定义为 HelloWorld:
请帮忙。
是的,你可以更改 apk 的名称试试这个
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig getSigningConfig()
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(output.outputFile.parent,
output.outputFile.name.replace("-debug", "-" + whatever name you want
)
}
}
}
}
此后还要同步并清理项目。
Edit
将其写入 build.gradle 文件中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)