啥也不是,直接看代码
public int getVersionCode(){
int versionCode = 0;
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(),0);
versionCode = packageInfo.versionCode;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return versionCode;
}