I\'d like to have a layout file which references the versionName attribute in my gradle file:
...
defaultConfig {
applicationId \"se.test.my
I use variables in my projects for versionName and versionCode
for example, in the app's build.gradle:
final VERSION_NAME = '2.2.3'
final VERSION_CODE = 15
android {
defaultConfig {
resValue "string", "version_code", VERSION_NAME + " (build " + VERSION_CODE + ")"
versionCode VERSION_CODE
versionName VERSION_NAME
...
}
...
}
Android Studio automatically generates an untranslatable string resource:
2.2.3 (build 15)
which I can use in xml:
hope it will be useful