Reputation: 41
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 ?
In the hello\config.xml, name tag is defined as HelloWorld already:
Please help.
Upvotes: 4
Views: 4528
Reputation: 3994
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.
Edit
Write this in build.gradle file.
Upvotes: 5