[英]How to rename android-debug.apk
I am using Cordova (5.1.1) and ionic framework to create my android. 我正在使用Cordova(5.1.1)和离子框架来创建我的android。 However, when I try to build the apk, why the file name is always "android-debug.apk" ?
但是,当我尝试构建apk时,为什么文件名始终是“android-debug.apk”? Is there any way to rename it ?
有没有办法重命名它?
In the hello\\config.xml, name tag is defined as HelloWorld already: 在hello \\ config.xml中,name标签已经定义为HelloWorld:
Please help. 请帮忙。
Yes you can change the name of the apk try this 是的你可以改变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
)
}
}
}
}
Also sync and clean the project after this. 此后还要同步和清理项目。
Edit 编辑
Write this in build.gradle file. 在build.gradle文件中写下这个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.