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
Use BuildConfig class
String versionName = BuildConfig.VERSION_NAME; int versionCode = BuildConfig.VERSION_CODE;
build.gradle(app)
defaultConfig { applicationId "com.myapp" minSdkVersion 19 targetSdkVersion 27 versionCode 17 versionName "1.0" }