android gradle:how 从 apk 中排除现有的 translation/locale?
android gradle:how to exclude existing translation/locale from apk?
我的 android 应用程序目前 contains 18 translations for 170 different strings 已翻译 6/170 到 170/170。
对于非英语应用用户来说,如果实际上只有 3% 的字符串被翻译,那么说该应用可以使用 xx 语言是没有意义的。
我的问题:是否可以告诉 android-studio 或 gradle 我不希望语言 xx 包含在最终的 apk 中而不删除 sourcetree 中的现有翻译?
我想排除翻译率低于 65% 的语言
另见
我找到了一种明确告诉支持哪些语言环境的方法,所以我必须列出我认为足够完整的语言
// this does not include de=german so german is excluded from apk
android {
defaultConfig {
resConfigs "ar","es","fr","hi","in","it","ja","nl","pl","ro","ru","tr","uk","zz","pt-rBR","zh-rCN","zh-rTW"
}
很遗憾,How to exclude certain files from Android Studio gradle builds? 的回答无效:
// no error but german resources are not excluded :-(
android {
sourceSets.main.res.filter.exclude '**/res/values-de/**'
}
我的 android 应用程序目前 contains 18 translations for 170 different strings 已翻译 6/170 到 170/170。
对于非英语应用用户来说,如果实际上只有 3% 的字符串被翻译,那么说该应用可以使用 xx 语言是没有意义的。
我的问题:是否可以告诉 android-studio 或 gradle 我不希望语言 xx 包含在最终的 apk 中而不删除 sourcetree 中的现有翻译?
我想排除翻译率低于 65% 的语言
另见
我找到了一种明确告诉支持哪些语言环境的方法,所以我必须列出我认为足够完整的语言
// this does not include de=german so german is excluded from apk
android {
defaultConfig {
resConfigs "ar","es","fr","hi","in","it","ja","nl","pl","ro","ru","tr","uk","zz","pt-rBR","zh-rCN","zh-rTW"
}
很遗憾,How to exclude certain files from Android Studio gradle builds? 的回答无效:
// no error but german resources are not excluded :-(
android {
sourceSets.main.res.filter.exclude '**/res/values-de/**'
}