Android SDK 28 – versionCode in PackageInfo has been deprecated
It says what to do on the Java doc (I recommend not using the Kotlin documentation for much; it’s not really maintained well): versionCode This field was deprecated in API level 28. Use getLongVersionCode() instead, which includes both this and the additional versionCodeMajor attribute. The version number of this package, as specified by the tag’s … Read more