如何重命名android-debug.apk [英] How to rename android-debug.apk
本文介绍了如何重命名android-debug.apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Cordova(5.1.1)和ionic框架创建我的android.但是,当我尝试构建apk时,为什么文件名始终为"android-debug.apk"?有什么办法可以重命名吗?
I am using Cordova (5.1.1) and ionic framework to create my android. However, when I try to build the apk, why the file name is always "android-debug.apk" ? Is there any way to rename it ?
- cordova创建hello com.example.hello HelloWorld
- cd hello
- cordova平台添加android
- cordova构建android
在hello \ config.xml中,名称标记已经定义为HelloWorld:
In the hello\config.xml, name tag is defined as HelloWorld already:
请帮助.
推荐答案
是的,您可以更改apk的名称,试试看
Yes you can change the name of the apk try this
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
)
}
}
}
}
此后还同步并清理项目.
Also sync and clean the project after this.
修改
将此内容写入build.gradle文件中.
Write this in build.gradle file.
这篇关于如何重命名android-debug.apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文