更改apk文件名
build.gradle中定义文件名称
def appName = “YourAppName”
android {
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = appName+".apk"
}
}
}
替换manifest.xml中的android:label
- 更改Androidmanifest.xml中application
android:label="${appName}"
- 更改build.gradle
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders =[appName:appName]
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders =[appName:appName]
}
}
|