I need to figure out how to get or make a build number for my Android application. I need the build number to display in the UI.
Do I have to do something with
val versionCode = BuildConfig.VERSION_CODE val versionName = BuildConfig.VERSION_NAME
Make sure to import BuildConfig into your class.
BuildConfig
String versionCode = String.valueOf(BuildConfig.VERSION_CODE); String versionName = String.valueOf(BuildConfig.VERSION_NAME);